API Documentation | All Packages | All Classes | Index | Frames No Frames |
Interface IMap

Package | org.openscales.core.basetypes.maps
Interface | public interface IMap
Implementors | HashMap

Defines the contract for lightweight HashMap implementations which are to expose an API into a managed collection of key value pairs

Public Methods

| Method | Defined by
--- | --- | ---
|  | clear():void Clears all key / values defined in the HashMap instance | IMap
|  | clearAllExcept(key:*):void Clears all key / values defined in the HashMap instance with the exception of the specified key | IMap
|  | containsKey(key:*):Boolean Determines if a key exists in the HashMap instance | IMap
|  | containsValue(value:*):Boolean Determines if a value exists in the HashMap instance | IMap
|  | getEntries():Array Returns an `Array` of `IHashMapEntry` objects based on the underlying internal map. | IMap
|  | getKey(value:*):* Returns a key value from the HashMap instance | IMap
|  | getKeys():Array Returns each key added to the HashMap instance | IMap
|  | getValue(key:*):* Returns a key value from the HashMap instance | IMap
|  | getValues():Array Returns each value assigned to each key in the HashMap instance | IMap
|  | isEmpty():Boolean Determines if the HashMap instance is empty | IMap
|  | put(key:*, value:*):void Adds a key / value pair to the current Map | IMap
|  | putAll(table:Dictionary):void Places all name / value pairs into the current `IMap` instance. | IMap
|  | putEntry(entry:IHashMapEntry):void `putEntry` is intended as a pseudo-overloaded `put` implementation whereby clients may call `putEntry` to pass an `IHashMapEntry` implementation. | IMap
|  | remove(key:*):void Removes a key / value from the HashMap instance | IMap
|  | reset():void Resets all key value assignments in the HashMap instance to null | IMap
|  | resetAllExcept(key:*):void Resets all key / values defined in the HashMap instance to null | IMap
|  | size():int Retrieves the size of the HashMap instance | IMap

Method detail

clear | () | method

`public function clear():void`

Clears all key / values defined in the HashMap instance

clearAllExcept | () | method |

`public function clearAllExcept(key:*):void`

Clears all key / values defined in the HashMap instance with the exception of the specified key

Parameters

| `key:*`

containsKey | () | method |

`public function containsKey(key:*):Boolean`

Determines if a key exists in the HashMap instance

Parameters

| `key:*` — the key in which to determine existance in the map

Returns

| `Boolean` — true if the key exisits, false if not

containsValue | () | method |

`public function containsValue(value:*):Boolean`

Determines if a value exists in the HashMap instance

Parameters

| `value:*` — the value in which to determine existance in the map

Returns

| `Boolean` — true if the value exisits, false if not

getEntries | () | method |

`public function getEntries():Array`

Returns an `Array` of `IHashMapEntry` objects based on the underlying internal map.

Returns

| `Array`

getKey | () | method |

`public function getKey(value:*):*`

Returns a key value from the HashMap instance

Parameters

| `value:*` — the key in which to retrieve the value of

Returns

| `*` — the value of the specified key

getKeys | () | method |

`public function getKeys():Array`

Returns each key added to the HashMap instance

Returns

| `Array` — String Array of key identifiers

getValue | () | method |

`public function getValue(key:*):*`

Returns a key value from the HashMap instance

Parameters

| `key:*` — the key in which to retrieve the value of

Returns

| `*` — the value of the specified key

getValues | () | method |

`public function getValues():Array`

Returns each value assigned to each key in the HashMap instance

Returns

| `Array` — Array of values assigned for all keys in the map

isEmpty | () | method |

`public function isEmpty():Boolean`

Determines if the HashMap instance is empty

Returns

| `Boolean` — true if the current map is empty, false if not

put | () | method |

`public function put(key:*, value:*):void`

Adds a key / value pair to the current Map

Parameters

| `key:*` — key to add to the map
| `value:*` — value of the specified key

putAll | () | method |

`public function putAll(table:Dictionary):void`

Places all name / value pairs into the current `IMap` instance.

Parameters

| `table:Dictionary` — `Object` of name / value pairs

putEntry | () | method |

`public function putEntry(entry:IHashMapEntry):void`

`putEntry` is intended as a pseudo-overloaded `put` implementation whereby clients may call `putEntry` to pass an `IHashMapEntry` implementation.

Parameters

| `entry:IHashMapEntry` — `IHashMapEntry` implementation

remove | () | method |

`public function remove(key:*):void`

Removes a key / value from the HashMap instance

Parameters

| `key:*` — key to remove from the map

reset | () | method |

`public function reset():void`

Resets all key value assignments in the HashMap instance to null

resetAllExcept | () | method |

`public function resetAllExcept(key:*):void`

Resets all key / values defined in the HashMap instance to null

Parameters

| `key:*`

size | () | method |

`public function size():int`

Retrieves the size of the HashMap instance

Returns

| `int` — the current size of the map instance