| Package | ch.capi.data |
| Class | public class TreeMap |
| Inheritance | TreeMap DictionnaryMap Object |
| Implements | IMap |
TreeMap is a simply structured IMap that can have a parent
IMap to search some keys.
Note that the methods remove() and clear() won't affect the parent
IMap.
| Property | Defined By | ||
|---|---|---|---|
| parent : IMap
Defines the parent IMap to look for the variables. | TreeMap | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new TreeMap object. | TreeMap | ||
![]() | clear():void
Removes all of the mappings from this map. | DictionnaryMap | |
clearAll():void
Clears the current TreeMap and also clear its parent. | TreeMap | ||
containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key. | TreeMap | ||
containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value. | TreeMap | ||
getValue(key:*):*
Retrieves the value mapped to the specified key or null if there is no mapping for
the key. | TreeMap | ||
isEmpty():Boolean
Returns true if the IMap contains no key-value mappings. | TreeMap | ||
keys():Array
Retrieves all the keys contained in the IMap and its parent. | TreeMap | ||
![]() | matches(obj:Object, strict:Boolean = false):Boolean
Compares the IMap and the specified Object pairs
key/value and checks if the values are the same. | DictionnaryMap | |
![]() | put(key:*, value:*):*
Associates the specified value with the specified key in the IMap. | DictionnaryMap | |
![]() |
Retrieves all the key/value from the source IMap and put them
in the current IMap. | DictionnaryMap | |
![]() | putObject(obj:Object):void
Puts all the key/value from the specified object in the IMap. | DictionnaryMap | |
![]() | remove(key:*):*
Removes the mapping for a key from the IMap if it is present. | DictionnaryMap | |
size():uint
Retrieves the number of key-value mappings in the IMap and its parent. | TreeMap | ||
![]() | toObject():Object
Returns an Object from the IMap. | DictionnaryMap | |
toString():String
Retrieves a String displaying all the key/value pairs of the TreeMap including its
parent IMap. | TreeMap | ||
values():Array
Retrieves all the values contained in the IMap and its parent. | TreeMap | ||
| parent | property |
parent:IMap [read-write]
Defines the parent IMap to look for the variables.
public function get parent():IMap public function set parent(value:IMap):void| TreeMap | () | Constructor |
public function TreeMap(parentMap:IMap = null, weakKeys:Boolean = false)
Creates a new TreeMap object.
parentMap:IMap (default = null) — The parent IMap.
| |
weakKeys:Boolean (default = false) — Defines if the keys are weak references.
|
| clearAll | () | method |
public function clearAll():void
Clears the current TreeMap and also clear its parent. If the parent IMap is also
a TreeMap, the clearAll() method is called, else the clear() method
is called.
| containsKey | () | method |
override public function containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key. If the key isn't found
in the current TreeMap, then it will be searched in the parent IMap.
Parameters
key:* — The key.
|
Boolean — true if the specified key is contained in the IMap.
|
| containsValue | () | method |
override public function containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value. If the value isn't found
in the current TreeMap, then it will be searched in the parent IMap.
Parameters
value:* — The value.
|
Boolean — true if the specified value is contained in the IMap.
|
| getValue | () | method |
override public function getValue(key:*):*
Retrieves the value mapped to the specified key or null if there is no mapping for
the key. If the value is null, it will be searched in the parent IMap.
Parameters
key:* — The key.
|
* — The object mapped to the specified key or null.
|
| isEmpty | () | method |
override public function isEmpty():Boolean
Returns true if the IMap contains no key-value mappings. Both parent and current
TreeMap must be empty.
Boolean — true if there is no mapping in the TreeMap and its parent.
|
| keys | () | method |
override public function keys():Array
Retrieves all the keys contained in the IMap and its parent.
Array — An Array containing all the keys.
|
| size | () | method |
override public function size():uint
Retrieves the number of key-value mappings in the IMap and its parent.
uint — The number of key-value mappings.
|
| toString | () | method |
override public function toString():String
Retrieves a String displaying all the key/value pairs of the TreeMap including its
parent IMap.
String — A String representing the TreeMap.
|
| values | () | method |
override public function values():Array
Retrieves all the values contained in the IMap and its parent.
Array — An Array containing all the values.
|