gugga.collections.ObjectHashTable Class Reference

Inheritance diagram for gugga.collections.ObjectHashTable:

Inheritance graph
[legend]
Collaboration diagram for gugga.collections.ObjectHashTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

ObjectHashTable can be used to collect Object to Object pairs. An unique hash is assigned to the key objects first time they get added to an ObjectHashTable collection.

Value objects may be of any type, while the key objects should be of Object type. If you need a value type keys use a HashTable object instead.

See also:
gugga.utils.HashUtil
Author:
stefan

Definition at line 18 of file ObjectHashTable.as.

Public Member Functions

function add (aKey, aObject:Object)
function remove (aKey)
function containsValue (aObject:Object)
function containsKey (aKey)
function getKeyByValue (aValue:Object)
function getValue (aKey)
function get IsEmpty ()
function get count ()
function clone ()
function getIterator ()

Private Member Functions

function addWithStringKey (aKey:String, aObject:Object)
function getAllElements ()


Member Function Documentation

function gugga.collections.ObjectHashTable.add ( aKey  ,
aObject:Object   
)

Adds a key-value pair to the hash table.

Parameters:
Object,which is the key in the map. The Object key should be an instance of Object.
Object value, that is associated to the key. The Object value may be of any type.

Definition at line 26 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.remove ( aKey   ) 

Removes a key-value pair from the hash table. This method will return undefined if you provide an incorrect key object.

Parameters:
Object key for the pair that should be removed

Definition at line 38 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.containsValue ( aObject:Object   ) 

Checks if an object exists in the table.

Parameters:
Object searching for

Definition at line 51 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.containsKey ( aKey   ) 

Checks if the table has a key with corresponding value.

Parameters:
Object key searching for

Definition at line 71 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.getKeyByValue ( aValue:Object   ) 

Gets the key for an object. The key returned is not the original key object, but its hash.

Parameters:
Object value to find the key for

Definition at line 90 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.getValue ( aKey   ) 

Gets value from the table, specified by its key.

Parameters:
Object key for the value Object to return (if exists)

Definition at line 109 of file ObjectHashTable.as.

function get gugga.collections.ObjectHashTable.IsEmpty (  ) 

Indicates whenever the table is empty.

Definition at line 118 of file ObjectHashTable.as.

function get gugga.collections.ObjectHashTable.count (  ) 

Counts the key-value pairs in the table.

Definition at line 130 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.clone (  ) 

Makes a shallow copy of itself.

Definition at line 143 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.addWithStringKey ( aKey:String  ,
aObject:Object   
) [private]

Adds an object to the table with a string key, instead of object key

Parameters:
String key for the value Object to add
Object to add

Definition at line 160 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.getAllElements (  )  [private]

Returns an array containing all elements of the set.

Definition at line 168 of file ObjectHashTable.as.

function gugga.collections.ObjectHashTable.getIterator (  ) 

Returns an iterator for the value objects of the table.

Definition at line 182 of file ObjectHashTable.as.


Generated on Fri May 11 17:13:30 2007 for GuggaFramework by  doxygen 1.5.2