Packagecom.gestureworks.cml.utils
Classpublic class ChildList
InheritanceChildList Inheritance LinkedMap Inheritance flash.utils.Proxy
Subclasses CMLObjectList

The ChildList utility is a data structure that creates an ordered map that can store duplicate keys. It has a built-in two-way iterator, and contains many options for storing and retrieving values.

The structure is comprised of:

        
        var cl:ChildList = new ChildList();
        cl.append("s1", new Sprite());
        cl.append("s2", new TouchSprite());
        
        cl.reset();0
        trace(cl.next());
     
     

See also

LinkedMap


Public Properties
 PropertyDefined By
 InheritedcurrentIndex : int
Returns and sets the current index
LinkedMap
 InheritedcurrentKey : *
[read-only] Returns the current key
LinkedMap
 InheritedcurrentValue : *
[read-only] Returns the current value
LinkedMap
 Inheritedindex : int
Returns and sets the current index
LinkedMap
 Inheritedkey : *
[read-only] Returns the current key
LinkedMap
 Inheritedlength : int
[read-only] Returns the length of the LinkedMap
LinkedMap
 Inheritedvalue : *
[read-only] Returns the current value
LinkedMap
Public Methods
 MethodDefined By
  
ChildList(weakKeys:Boolean = false)
ChildList
 Inherited
append(key:*, value:*):void
Appends a value to the keys
LinkedMap
  
getClass(value:Class, index:int = -1):*
Returns a LinkedMap of objects that are of the specified AS3 class if no second argument is given.
ChildList
  
getCSSClass(value:String, index:int = -1):*
Returns a LinkedMap of objects that are of the specified CSS class if no second argument is given.
ChildList
 Inherited
getIndex(index:int):*
Returns the value by index
LinkedMap
 Inherited
getKey(key:*):*
Returns the value by key
LinkedMap
 Inherited
getKeyArray():Array
Returns an array of keys.
LinkedMap
 Inherited
Returns an array of values
LinkedMap
 Inherited
hasKey(key:*):Boolean
Returns true if key exists
LinkedMap
 Inherited
hasNext():Boolean
Returns true if the iteration can return one more than the current index
LinkedMap
 Inherited
hasPrev():Boolean
Returns true if the iteration can return one less than the current index
LinkedMap
 Inherited
hasValue(value:*):Boolean
Returns true if value exists
LinkedMap
 Inherited
insert(index:int, key:*, value:*):void
Inserts a new key and value by index
LinkedMap
 Inherited
next():*
Returns the next value
LinkedMap
 Inherited
prepend(key:*, value:*):void
Prepends a key and value
LinkedMap
 Inherited
prev():*
Returns the previous index
LinkedMap
 Inherited
remove():void
Removes a key, value at current index
LinkedMap
 Inherited
removeByValue(value:*):void
Removes a key, value pair by value
LinkedMap
 Inherited
removeIndex(index:int):void
Removes a key, value pair by index
LinkedMap
 Inherited
removeKey(key:*):void
Removes a key, value pair by key
LinkedMap
 Inherited
replace(key:*, value:*):void
Replaces a key, value pair at the current index
LinkedMap
 Inherited
replaceKey(key:*, value:*):void
Replaces a value by key.
LinkedMap
 Inherited
reset():void
Resets the current index to zero
LinkedMap
 Inherited
search(value:*):int
Searches by value and returns the first index found
LinkedMap
 Inherited
searchAll(value:*):Array
Searches by value and returns an array of indices found
LinkedMap
 Inherited
selectIndex(index:int):*
Returns a value by index and increments the current index to the provided index parameter
LinkedMap
 Inherited
selectKey(key:*):*
Returns a value by key and increments the current index to the provided index parameter
LinkedMap
 Inherited
toArray():Array
Returns a multidimensional array of key / value pairs
LinkedMap
Constructor Detail
ChildList()Constructor
public function ChildList(weakKeys:Boolean = false)



Parameters
weakKeys:Boolean (default = false)
Method Detail
getClass()method
public function getClass(value:Class, index:int = -1):*

Returns a LinkedMap of objects that are of the specified AS3 class if no second argument is given. Returns the nth object of the returned LinkedMap if the second argument is present.

Parameters

value:Class
 
index:int (default = -1)

Returns
*
getCSSClass()method 
public function getCSSClass(value:String, index:int = -1):*

Returns a LinkedMap of objects that are of the specified CSS class if no second argument is given. Returns the nth object of the retuned LinkedMap if the second argument is present.

Parameters

value:String
 
index:int (default = -1)

Returns
*