IntHash

class IntHash<T>Available in flash8, flash, neko, js, php, cpp, cs, java

Hashtable over a set of elements, using Int as keys. On Flash and Javascript, the underlying structure is an Object.

Usage Examples

function new() : VoidCreates a new empty hashtable. function exists( key : Int ) : 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 : Int ) : Null<T>Get a value for the given key. function iterator() : Iterator<T>Available in cs, javaReturns an iterator of all values in the hashtable. function iterator() : Iterator<T>Available in flash8, flash, neko, js, php, cppReturns an iterator of all values in the hashtable. function keys() : Iterator<Int>Available in cs, javaReturns an iterator of all keys in the hashtable. function keys() : Iterator<Int>Available in flash8, flash, neko, js, php, cppReturns an iterator of all keys in the hashtable. function remove( key : Int ) : BoolRemoves a hashtable entry. Returns true if there was such entry. function set( key : Int, value : T ) : VoidSet a value for the given key. function toString() : StringReturns an displayable representation of the hashtable content.
version #15020, modified 2012-07-16 12:29:58 by api
0 comment