phpDocumentor collections
[ class tree: collections ] [ index: collections ] [ all elements ]

Class: WindSortedList

Source Location: /collections/WindSortedList.php

Class WindSortedList

Class Overview

Implements interfaces:

  • IteratorAggregate (internal interface)
  • ArrayAccess (internal interface)
  • Countable (internal interface)

表示键/值对的集合,这些键值对按键排序并可按照键和索引访问。

Located in /collections/WindSortedList.php [line 10]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Id: WindSortedList.php 2973 2011-10-15 19:22:48Z yishuo $
Copyright:  ©2003-2103 phpwind.com
License:  http://www.windframework.com

Methods

[ Top ]
Method Summary
WindSortedList   __construct()   WindList 实现有三种类别:只读、固定大小、可变大小。
void   add()   将带有指定键和值的元素添加到 WindSortedList 对象。
boolean   clear()   从 SortedList 对象中移除所有元素。
boolean   contains()   确定 WindSortedList对象是否包含特定的键。
boolean   containsIndex()   根据指定的索引确定 WindSortedList对象是否包含特定的键。
boolean   containsKey()   确定 WindSortedList对象是否包含特定的键。
boolean   containsValue()   确定 WindSortedList对象是否包含特定值。
void   count()  
number   getCount()   返回集合的总数
boolean   getIsFixedSize()   取得集合是否是固定大小
boolean   getIsReadOnly()   取得集合是否只读
ArrayIterator   getIterator()   取得WindSortedList集合迭代器
mixed   getKey()   获取 WindSortedList 对象的指定索引处的键。
mixed   getKeyList()   获取WindSortedList 对象中的键。
mixed   getValueList()   获取WindSortedList 对象中的值。
mixed   indexOfKey()   返回WindSortedList 对象中指定键的从零开始的索引。
mixed   indexOfValue()   返回指定的值在 SortedList 对象中第一个匹配项的从零开始的索引。
mixed   item()   从WindSortedList中返回指定键的的值
mixed   itemAt()   从WindSortedList中返回指定索引的的值
void   offsetExists()  
void   offsetGet()  
void   offsetSet()  
void   offsetUnset()  
mixed   remove()   从 SortedList 对象中移除带有指定键的元素。
mixed   removeAt()   移除 WindSortedList对象的指定索引处的元素。
boolean   setByIndex()   替换WindSortedList对象中指定索引处的值。
mixed   setByKey()   替换WindSortedList对象中指定键处的值。
WindSortedList   __clone()   创建 WindSortedList对象的浅表副本。

[ Top ]
Methods
Constructor __construct  [line 37]

  WindSortedList __construct( [array|WindList $data = array()], [boolean $readOnly = false]  )

WindList 实现有三种类别:只读、固定大小、可变大小。

无法修改只读 WindList。 固定大小的 WindList 不允许添加或移除元素,但允许修改现有元素。 可变大小的 WindList 允许添加、移除和修改元素。

Parameters:
boolean   $readOnly:  是否只读
array|WindList   $data:  固定长度,如果指定了$data,那么这个WindList集合的长度是固定的,只许修改

API Tags:
Access:  public


[ Top ]
add  [line 58]

  void add( mixed $key, mixed $value  )

将带有指定键和值的元素添加到 WindSortedList 对象。

Parameters:
mixed   $key: 
mixed   $value: 

API Tags:
Access:  public


[ Top ]
clear  [line 233]

  boolean clear( )

从 SortedList 对象中移除所有元素。


API Tags:
Access:  public


[ Top ]
contains  [line 72]

  boolean contains( mixed $key  )

确定 WindSortedList对象是否包含特定的键。

Parameters:
mixed   $key: 

API Tags:
Access:  public


[ Top ]
containsIndex  [line 81]

  boolean containsIndex( $index, mixed $key  )

根据指定的索引确定 WindSortedList对象是否包含特定的键。

Parameters:
mixed   $key: 
   $index: 

API Tags:
Access:  public


[ Top ]
containsKey  [line 90]

  boolean containsKey( mixed $key  )

确定 WindSortedList对象是否包含特定的键。

Parameters:
mixed   $key: 

API Tags:
Access:  public


[ Top ]
containsValue  [line 99]

  boolean containsValue( mixed $value  )

确定 WindSortedList对象是否包含特定值。

Parameters:
mixed   $value: 

API Tags:
Access:  public


[ Top ]
count  [line 263]

  void count( )


API Tags:
Access:  public


Implementation of:
Countable::count

[ Top ]
getCount  [line 257]

  number getCount( )

返回集合的总数


API Tags:
Access:  public


[ Top ]
getIsFixedSize  [line 250]

  boolean getIsFixedSize( )

取得集合是否是固定大小


API Tags:
Access:  public


[ Top ]
getIsReadOnly  [line 243]

  boolean getIsReadOnly( )

取得集合是否只读


API Tags:
Access:  public


[ Top ]
getIterator  [line 270]

  ArrayIterator getIterator( )

取得WindSortedList集合迭代器


API Tags:
Access:  public


Implementation of:
IteratorAggregate::getIterator

[ Top ]
getKey  [line 108]

  mixed getKey( int $index  )

获取 WindSortedList 对象的指定索引处的键。

Parameters:
int   $index:  指定的索引

API Tags:
Access:  public


[ Top ]
getKeyList  [line 120]

  mixed getKeyList( )

获取WindSortedList 对象中的键。


API Tags:
Access:  public


[ Top ]
getValueList  [line 128]

  mixed getValueList( )

获取WindSortedList 对象中的值。


API Tags:
Access:  public


[ Top ]
indexOfKey  [line 137]

  mixed indexOfKey( mixed $key  )

返回WindSortedList 对象中指定键的从零开始的索引。

Parameters:
mixed   $key: 

API Tags:
Access:  public


[ Top ]
indexOfValue  [line 146]

  mixed indexOfValue( mixed $value  )

返回指定的值在 SortedList 对象中第一个匹配项的从零开始的索引。

Parameters:
mixed   $value: 

API Tags:
Access:  public


[ Top ]
item  [line 155]

  mixed item( int $key  )

从WindSortedList中返回指定键的的值

Parameters:
int   $key: 

API Tags:
Access:  public


[ Top ]
itemAt  [line 166]

  mixed itemAt( int $index  )

从WindSortedList中返回指定索引的的值

Parameters:
int   $index: 

API Tags:
Access:  public


[ Top ]
offsetExists  [line 276]

  void offsetExists( $offset  )

Parameters:
   $offset: 

API Tags:
Access:  public


Implementation of:
ArrayAccess::offsetExists

[ Top ]
offsetGet  [line 285]

  void offsetGet( $offset  )

Parameters:
   $offset: 

API Tags:
Access:  public


Implementation of:
ArrayAccess::offsetGet

[ Top ]
offsetSet  [line 294]

  void offsetSet( $offset, $value  )

Parameters:
   $offset: 
   $value: 

API Tags:
Access:  public


Implementation of:
ArrayAccess::offsetSet

[ Top ]
offsetUnset  [line 303]

  void offsetUnset( $offset  )

Parameters:
   $offset: 

API Tags:
Access:  public


Implementation of:
ArrayAccess::offsetUnset

[ Top ]
remove  [line 175]

  mixed remove( mixed $key  )

从 SortedList 对象中移除带有指定键的元素。

Parameters:
mixed   $key: 

API Tags:
Access:  public


[ Top ]
removeAt  [line 190]

  mixed removeAt( int $index  )

移除 WindSortedList对象的指定索引处的元素。

Parameters:
int   $index: 

API Tags:
Access:  public


[ Top ]
setByIndex  [line 204]

  boolean setByIndex( int $index, mixed $value  )

替换WindSortedList对象中指定索引处的值。

Parameters:
int   $index: 
mixed   $value: 

API Tags:
Access:  public


[ Top ]
setByKey  [line 217]

  mixed setByKey( mixed $key, mixed $value  )

替换WindSortedList对象中指定键处的值。

如果指定的键存在,那么替换,否则新增

Parameters:
mixed   $key: 
mixed   $value: 

API Tags:
Access:  public


[ Top ]
__clone  [line 313]

  WindSortedList __clone( )

创建 WindSortedList对象的浅表副本。


API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:41 +0800 by phpDocumentor 1.4.4