Package | com.boostworthy.collections |
Class | public class HashMap |
Implements | ICollection, IDisposable |
See also
Property | Defined by | ||
---|---|---|---|
length : uint [read-only]
Gets the length of this collection.
| HashMap |
Property | Defined by | ||
---|---|---|---|
m_aKeys : Array
An array for storing map keys.
| HashMap | ||
m_aValues : Array
An array for storing map values.
| HashMap |
Method | Defined by | ||
---|---|---|---|
HashMap(objMap:Object = null)
Constructor.
| HashMap | ||
Creates a new hash map that is a clone of this collection.
| HashMap | ||
containsKey(objKey:Object):Boolean
Checks to see if this collection contains the specified key.
| HashMap | ||
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as
removing event listeners, setting object references to 'null', etc.
| HashMap | ||
get(objKey:Object):Object
Gets the value that is paired with the specified key.
| HashMap | ||
getIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type.
| HashMap | ||
getKeyIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type for iterating through keys.
| HashMap | ||
getValueIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type for iterating through values.
| HashMap | ||
put(objKey:Object, objValue:Object):void
Adds a new key and value pair to this collection.
| HashMap | ||
putMap(objMap:Object):void
Iterates through all accessible properties/elements of the specified
object and adds each one as a key/value pair to this collection.
| HashMap | ||
remove(objKey:Object):void
Removes the specified key and it's corresponding value from this collection.
| HashMap |
Method | Defined by | ||
---|---|---|---|
init(objMap:Object):void
Initializes this object.
| HashMap | ||
searchForKey(objKey:Object):int
Searches through the keys array to see if the key is being stored by this object.
| HashMap |
length | property |
length:uint
[read-only]Gets the length of this collection.
Implementation public function get length():uint
m_aKeys | property |
protected var m_aKeys:Array
An array for storing map keys.
m_aValues | property |
protected var m_aValues:Array
An array for storing map values.
HashMap | () | constructor |
public function HashMap(objMap:Object = null)
Constructor.
ParametersobjMap:Object (default = null )
|
clone | () | method |
public function clone():HashMap
Creates a new hash map that is a clone of this collection.
ReturnsHashMap —
A new hash map that is a clone of this collection.
|
containsKey | () | method |
public function containsKey(objKey:Object):Boolean
Checks to see if this collection contains the specified key.
ParametersobjKey:Object — The key being searched for.
|
Boolean — A boolean value of 'true' if the key exists, 'false' if it does not.
|
dispose | () | method |
public function dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.
get | () | method |
public function get(objKey:Object):Object
Gets the value that is paired with the specified key. If not such key exists, 'null' is returned.
ParametersobjKey:Object — They key to use to retrieve a value.
|
Object — The value that was paired with the specified key.
|
getIterator | () | method |
public function getIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type.
ParametersuIterator:uint (default = 2 ) — The iterator type to use for iterating through the data being stored by this collection. Default is '2' (IteratorType.ARRAY_FORWARD).
|
IIterator —
An iterator instance of the specified type.
|
See also
getKeyIterator | () | method |
public function getKeyIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type for iterating through keys.
ParametersuIterator:uint (default = 2 ) — The iterator type to use for iterating through the keys being stored by this collection. Default is '2' (IteratorType.ARRAY_FORWARD).
|
IIterator —
An iterator instance of the specified type.
|
See also
getValueIterator | () | method |
public function getValueIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type for iterating through values.
ParametersuIterator:uint (default = 2 ) — The iterator type to use for iterating through the values being stored by this collection. Default is '2' (IteratorType.ARRAY_FORWARD).
|
IIterator —
An iterator instance of the specified type.
|
See also
init | () | method |
protected function init(objMap:Object):void
Initializes this object.
ParametersobjMap:Object |
put | () | method |
public function put(objKey:Object, objValue:Object):void
Adds a new key and value pair to this collection.
ParametersobjKey:Object — The key to use to retrieve the value.
|
|
objValue:Object — The value to store.
|
putMap | () | method |
public function putMap(objMap:Object):void
Iterates through all accessible properties/elements of the specified object and adds each one as a key/value pair to this collection.
ParametersobjMap:Object — The object to extract key/value pairs from.
|
remove | () | method |
public function remove(objKey:Object):void
Removes the specified key and it's corresponding value from this collection.
ParametersobjKey:Object — The key to be removed.
|
searchForKey | () | method |
protected function searchForKey(objKey:Object):int
Searches through the keys array to see if the key is being stored by this object. If the key is found, it's index in the keys array is returned. If the key is not found, the null index value is returned.
ParametersobjKey:Object — The key being searched for.
|
int — The index that the key is being stored at in the keys array.
|
See also