| Package | ch.capi.data |
| Class | public class DictionnaryMap |
| Inheritance | DictionnaryMap Object |
| Implements | IMap |
| Subclasses | LinkedMap, TreeMap |
IMap based on a Dictionnary.
| Method | Defined By | ||
|---|---|---|---|
DictionnaryMap(weakKeys:Boolean = false)
Creates a new DictionnaryMap object. | DictionnaryMap | ||
clear():void
Removes all of the mappings from this map. | DictionnaryMap | ||
containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key. | DictionnaryMap | ||
containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value. | DictionnaryMap | ||
getValue(key:*):*
Retrieves the value mapped to the specified key or null if there is no mapping for
the key. | DictionnaryMap | ||
isEmpty():Boolean
Returns true if the IMap contains no key-value mappings. | DictionnaryMap | ||
keys():Array
Retrieves all the keys contained in the IMap. | DictionnaryMap | ||
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. | DictionnaryMap | ||
toObject():Object
Returns an Object from the IMap. | DictionnaryMap | ||
toString():String
Retrieves a String displaying all the key/value pairs of the DictionnaryMap. | DictionnaryMap | ||
values():Array
Retrieves all the values contained in the IMap. | DictionnaryMap | ||
| DictionnaryMap | () | Constructor |
public function DictionnaryMap(weakKeys:Boolean = false)
Creates a new DictionnaryMap object.
weakKeys:Boolean (default = false) — Instructs the Dictionary object to use "weak" references on object keys.
|
| clear | () | method |
public function clear():voidRemoves all of the mappings from this map.
| containsKey | () | method |
public function containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key.
Parameters
key:* — The key.
|
Boolean — true if the specified key is contained in the IMap.
|
| containsValue | () | method |
public function containsValue(value:*):BooleanReturns true if this map maps one or more keys to the specified value.
Parameters
value:* — The value.
|
Boolean — true if the specified value is contained in the IMap.
|
| getValue | () | method |
public function getValue(key:*):*
Retrieves the value mapped to the specified key or null if there is no mapping for
the key.
Parameters
key:* — The key.
|
* — The object mapped to the specified key or null.
|
| isEmpty | () | method |
public function isEmpty():Boolean
Returns true if the IMap contains no key-value mappings.
Boolean — true if there is no mapping.
|
| keys | () | method |
public function keys():Array
Retrieves all the keys contained in the IMap.
Array — An Array containing all the keys.
|
| matches | () | method |
public function 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. A null Object
will be considered as an empty Object.
Parameters
obj:Object — An Object to compare. If the Object is
a IMap, then it will be used as it.
| |
strict:Boolean (default = false) — Defines if the match must be strict or if there can be more pairs
in the IMap than defined in the Object.
|
Boolean — true if the IMap matches the Object.
|
| put | () | method |
public function put(key:*, value:*):*
Associates the specified value with the specified key in the IMap.
Parameters
key:* — The key.
| |
value:* — The value.
|
* — The previous value mapped to the key or null.
|
Error If — the key is null.
|
| putAll | () | method |
public function putAll(source:IMap):void
Retrieves all the key/value from the source IMap and put them
in the current IMap.
Parameters
source:IMap — The source IMap.
|
| putObject | () | method |
public function putObject(obj:Object):void
Puts all the key/value from the specified object in the IMap.
Parameters
obj:Object — The source Object.
|
| remove | () | method |
public function remove(key:*):*
Removes the mapping for a key from the IMap if it is present.
Parameters
key:* — The key to remove.
|
* — The mapped value for this key.
|
| size | () | method |
public function size():uint
Retrieves the number of key-value mappings in the IMap.
uint — The number of key-value mappings.
|
| toObject | () | method |
public function toObject():Object
Returns an Object from the IMap.
Object — An Object with the same pair key/values.
|
| toString | () | method |
public function toString():String
Retrieves a String displaying all the key/value pairs of the DictionnaryMap.
String — A String representing the DictionnaryMap.
|
| values | () | method |
public function values():Array
Retrieves all the values contained in the IMap.
Array — An Array containing all the values.
|