Packagejp.nium.collections
Classpublic class IdGroupCollection
InheritanceIdGroupCollection Inheritance flash.events.EventDispatcher

IIdGroup インターフェイスを継承したインスタンスを管理するコレクションクラスです。


Example
  



Public Properties
 PropertyDefined by
  instances : Array
[read-only] 子インスタンスが保存されている配列です。 この配列を操作することで元の配列を変更することはできません。
IdGroupCollection
  numInstances : uint
[read-only] 子として登録されているインスタンス数を取得します。 Returns the number of children of this Instance.
IdGroupCollection
Public Methods
 MethodDefined by
  
新しい IdGroupCollection インスタンスを作成します。 Creates a new IdGroupCollection object.
IdGroupCollection
  
addInstance(instance:IIdGroup):uint
インスタンスを登録します。
IdGroupCollection
  
指定された id と同じ値が設定されている IIdGroup インスタンスを返します。
IdGroupCollection
  
getInstancesByGroup(group:String, sort:Boolean = false):Array
指定された group と同じ値を持つ IIdGroup インスタンスを含む配列を返します。
IdGroupCollection
  
registerGroup(instance:IIdGroup, group:String):Boolean
登録されているインスタンスに対して group を割り当てます。
IdGroupCollection
  
registerId(instance:IIdGroup, id:String):Boolean
登録されているインスタンスに対して id を割り当てます。
IdGroupCollection
Events
 EventSummaryDefined by
   コレクションに対して、インスタンスが追加された場合に送出されます。 IdGroupCollection
Property detail
instancesproperty
instances:Array  [read-only]

子インスタンスが保存されている配列です。 この配列を操作することで元の配列を変更することはできません。

Implementation
    public function get instances():Array
numInstancesproperty 
numInstances:uint  [read-only]

子として登録されているインスタンス数を取得します。 Returns the number of children of this Instance.

Implementation
    public function get numInstances():uint
Constructor detail
IdGroupCollection()constructor
public function IdGroupCollection()

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

Method detail
addInstance()method
public function addInstance(instance:IIdGroup):uint

インスタンスを登録します。

Parameters
instance:IIdGroup登録したいインスタンスです。

Returns
uintインスタンスに割り当てられたユニークな番号です。
getInstanceById()method 
public function getInstanceById(id:String):IIdGroup

指定された id と同じ値が設定されている IIdGroup インスタンスを返します。

Parameters
id:String条件となるストリングです。

Returns
IIdGroup条件と一致するインスタンスです。

See also

getInstancesByGroup()method 
public function getInstancesByGroup(group:String, sort:Boolean = false):Array

指定された group と同じ値を持つ IIdGroup インスタンスを含む配列を返します。

Parameters
group:String条件となるストリングです。
 
sort:Boolean (default = false)結果の配列をソートして返すかどうかを指定します。

Returns
Array条件と一致するインスタンスを含む配列です。

See also

registerGroup()method 
public function registerGroup(instance:IIdGroup, group:String):Boolean

登録されているインスタンスに対して group を割り当てます。

Parameters
instance:IIdGroupgroup を割り当てたいインスタンスです。
 
group:String割り当てたい group を示すストリングです。

Returns
Boolean割り当てられた group を示すストリングです。

See also

registerId()method 
public function registerId(instance:IIdGroup, id:String):Boolean

登録されているインスタンスに対して id を割り当てます。

Parameters
instance:IIdGroupid を割り当てたいインスタンスです。
 
id:String割り当てたい id を示すストリングです。

Returns
Boolean割り当てられた id を示すストリングです。

See also

Event detail
collectionUpdateevent 
Event object type: jp.nium.core.events.CollectionEvent

コレクションに対して、インスタンスが追加された場合に送出されます。