Hash

class Hash<T>Available in flash, flash9, neko, js, php, cpp

Hashtable over a set of elements, using String as keys. Other kind of keys are not possible on all platforms since they can't always be implemented efficiently.

Usage Examples

function new() : VoidCreates a new empty hashtable. function exists( key : String ) : BoolTells if a value exists for the given key. In particular, it's useful to tell if a key has a null value versus no value. function get( key : String ) : Null<T>Get a value for the given key. function iterator() : Iterator<T>Returns an iterator of all values in the hashtable. function keys() : Iterator<String>Returns an iterator of all keys in the hashtable. function remove( key : String ) : BoolRemoves a hashtable entry. Returns true if there was such entry. function set( key : String, value : T ) : VoidSet a value for the given key. function toString() : StringReturns an displayable representation of the hashtable content.
version #10004, modified 2011-01-30 15:49:10 by api