Packagejp.nium.collections
Classpublic class UniqueList

重複する値の登録を許可しないリストオブジェクトです。


Example
  var item1:Object = {};
  var item2:Object = {};
  
  var list:UniqueList = new UniqueList();
  
  list.addItem( item1 );
  list.addItem( item2 );
  list.addItem( item1 );
  
  trace( list.numItems == 2 ); // true
  trace( list.getItemAt( 1 ) == item1 ); // true
  



Public Properties
 PropertyDefined by
  numItems : int
[read-only] 子アイテムとして登録されているオブジェクト数を取得します。 Returns the number of children of this Item.
UniqueList
Public Methods
 MethodDefined by
  
UniqueList(... items)
新しい UniqueList インスタンスを作成します。 Creates a new UniqueList object.
UniqueList
  
addItem(item:*):*
子アイテムとして登録します。
UniqueList
  
addItemAt(item:*, index:int):*
指定されたインデックス位置に子アイテムとして登録します。
UniqueList
  
UniqueList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an UniqueList subclass.
UniqueList
  
contains(item:*):Boolean
指定されたオブジェクトが登録されているかどうかを返します。
UniqueList
  
dispose():void
保持しているデータを破棄します。
UniqueList
  
getItemAt(index:int):*
指定されたインデックス位置にある子アイテムを返します。
UniqueList
  
getItemIndex(item:*):int
子アイテムの登録されているインデックス位置を返します。
UniqueList
  
removeItem(item:*):*
子アイテムを削除します。
UniqueList
  
removeItemAt(index:int):*
指定されたインデックス位置にある子アイテムを削除します。
UniqueList
  
setItemIndex(item:*, index:int):void
既存の子アイテムのインデックス位置を変更します。
UniqueList
  
swapItems(item1:*, item2:*):void
指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。
UniqueList
  
swapItemsAt(index1:int, index2:int):void
子リスト内の指定されたインデックス位置に該当する 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。
UniqueList
  
toArray():Array
指定されたオブジェクトの配列表現を返します。 Returns the array representation of the specified object.
UniqueList
Property detail
numItemsproperty
numItems:int  [read-only]

子アイテムとして登録されているオブジェクト数を取得します。 Returns the number of children of this Item.

Implementation
    public function get numItems():int
Constructor detail
UniqueList()constructor
public function UniqueList(... items)

新しい UniqueList インスタンスを作成します。 Creates a new UniqueList object.

Parameters
... items登録したいオブジェクトを含む配列です。
Method detail
addItem()method
public function addItem(item:*):*

子アイテムとして登録します。

Parameters
item:*登録したいオブジェクトです。

Returns
*item パラメータで渡すオブジェクトです。

See also

addItemAt()method 
public function addItemAt(item:*, index:int):*

指定されたインデックス位置に子アイテムとして登録します。

Parameters
item:*登録したいオブジェクトです。
 
index:int子を追加するインデックス位置です。既にオブジェクトが置かれているインデックス位置を指定すると、その位置にあるオブジェクトとその上に位置するすべてのオブジェクトが、子リスト内で 1 つ上の位置に移動します。

Returns
*item パラメータで渡すオブジェクトです。

See also

clone()method 
public function clone():UniqueList

UniqueList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an UniqueList subclass.

Returns
UniqueList元のオブジェクトと同じプロパティ値を含む新しい UniqueList インスタンスです。 A new UniqueList object that is identical to the original.
contains()method 
public function contains(item:*):Boolean

指定されたオブジェクトが登録されているかどうかを返します。

Parameters
item:*テストする子オブジェクトです。

Returns
Boolean登録されていれば true を、それ以外では false です。
dispose()method 
public function dispose():void

保持しているデータを破棄します。

getItemAt()method 
public function getItemAt(index:int):*

指定されたインデックス位置にある子アイテムを返します。

Parameters
index:int子アイテムのインデックス位置です。

Returns
*指定されたインデックス位置にある子アイテムです。
getItemIndex()method 
public function getItemIndex(item:*):int

子アイテムの登録されているインデックス位置を返します。

Parameters
item:*特定するアイテムです。

Returns
int特定するアイテムのインデックス位置です。

See also

removeItem()method 
public function removeItem(item:*):*

子アイテムを削除します。

Parameters
item:*削除したいオブジェクトです。

Returns
*item パラメータで渡すオブジェクトです。

See also

removeItemAt()method 
public function removeItemAt(index:int):*

指定されたインデックス位置にある子アイテムを削除します。

Parameters
index:int削除したいオブジェクトのインデックス位置です。

Returns
*削除されたオブジェクトです。

See also

setItemIndex()method 
public function setItemIndex(item:*, index:int):void

既存の子アイテムのインデックス位置を変更します。

Parameters
item:*インデックス番号を変更する子アイテムです。
 
index:intitem オブジェクトの結果のインデックス番号です。

See also

swapItems()method 
public function swapItems(item1:*, item2:*):void

指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。

Parameters
item1:*先頭の子オブジェクトです。
 
item2:*2 番目の子オブジェクトです。

See also

swapItemsAt()method 
public function swapItemsAt(index1:int, index2:int):void

子リスト内の指定されたインデックス位置に該当する 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。

Parameters
index1:int最初の子オブジェクトのインデックス位置です。
 
index2:int2 番目の子オブジェクトのインデックス位置です。

See also

toArray()method 
public function toArray():Array

指定されたオブジェクトの配列表現を返します。 Returns the array representation of the specified object.

Returns
Arrayオブジェクトの配列表現です。 A array representation of the object.