WindSortedList __construct(
[array|WindList
$data = array()], [boolean
$readOnly = false]
)
|
|
WindList 实现有三种类别:只读、固定大小、可变大小。
无法修改只读 WindList。 固定大小的 WindList 不允许添加或移除元素,但允许修改现有元素。 可变大小的 WindList 允许添加、移除和修改元素。
Parameters:
boolean |
$readOnly: |
是否只读 |
array|WindList |
$data: |
固定长度,如果指定了$data,那么这个WindList集合的长度是固定的,只许修改 |
API Tags:
void add(
mixed
$key, mixed
$value
)
|
|
将带有指定键和值的元素添加到 WindSortedList 对象。
Parameters:
mixed |
$key: |
|
mixed |
$value: |
|
API Tags:
从 SortedList 对象中移除所有元素。
API Tags:
boolean contains(
mixed
$key
)
|
|
确定 WindSortedList对象是否包含特定的键。
Parameters:
API Tags:
boolean containsIndex(
$index, mixed
$key
)
|
|
根据指定的索引确定 WindSortedList对象是否包含特定的键。
Parameters:
API Tags:
boolean containsKey(
mixed
$key
)
|
|
确定 WindSortedList对象是否包含特定的键。
Parameters:
API Tags:
boolean containsValue(
mixed
$value
)
|
|
确定 WindSortedList对象是否包含特定值。
Parameters:
API Tags:
API Tags:
Implementation of:
- Countable::count
boolean getIsFixedSize(
)
|
|
取得集合是否是固定大小
API Tags:
ArrayIterator getIterator(
)
|
|
取得WindSortedList集合迭代器
API Tags:
Implementation of:
- IteratorAggregate::getIterator
mixed getKey(
int
$index
)
|
|
获取 WindSortedList 对象的指定索引处的键。
Parameters:
API Tags:
获取WindSortedList 对象中的键。
API Tags:
获取WindSortedList 对象中的值。
API Tags:
mixed indexOfKey(
mixed
$key
)
|
|
返回WindSortedList 对象中指定键的从零开始的索引。
Parameters:
API Tags:
mixed indexOfValue(
mixed
$value
)
|
|
返回指定的值在 SortedList 对象中第一个匹配项的从零开始的索引。
Parameters:
API Tags:
从WindSortedList中返回指定键的的值
Parameters:
API Tags:
mixed itemAt(
int
$index
)
|
|
从WindSortedList中返回指定索引的的值
Parameters:
API Tags:
void offsetExists(
$offset
)
|
|
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetExists
void offsetGet(
$offset
)
|
|
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetGet
void offsetSet(
$offset,
$value
)
|
|
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetSet
void offsetUnset(
$offset
)
|
|
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetUnset
mixed remove(
mixed
$key
)
|
|
从 SortedList 对象中移除带有指定键的元素。
Parameters:
API Tags:
mixed removeAt(
int
$index
)
|
|
移除 WindSortedList对象的指定索引处的元素。
Parameters:
API Tags:
boolean setByIndex(
int
$index, mixed
$value
)
|
|
替换WindSortedList对象中指定索引处的值。
Parameters:
int |
$index: |
|
mixed |
$value: |
|
API Tags:
mixed setByKey(
mixed
$key, mixed
$value
)
|
|
替换WindSortedList对象中指定键处的值。
如果指定的键存在,那么替换,否则新增
Parameters:
mixed |
$key: |
|
mixed |
$value: |
|
API Tags:
创建 WindSortedList对象的浅表副本。
API Tags: