Generic Table Wrapper
📖 Read the detailed guide for hand-written examples and background.
Re-exports: TypeCasting, Table
public class HashMap<K,V> extends Table
Members:
has(K key) returns boolean Whether a value exists under the given key or notput(K key, V value) Saves the given value under the given keyget(K key) returns V Retrieves the value saved under the given keyremove(K key) Removes the value saved under the given keygetAndRemove(K key) returns V Retrieves the value saved under the given key and removes itsize() returns intoverride function flush()public class IterableMap<K,V> extends HashMap<K, V>
Iterable generic Table Wrapper
Members:
construct()construct(thistype base) Create a new map by copying all elements from another list into itoverride function put(K key, V value) Saves the given value under the given keyoverride function remove(K key) Removes the key-value pair saved under the given keyoverride function flush() Remove all data from this mapoverride function getAndRemove(K key) returns V Retrieves the value saved under the given key and removes ititerator() returns HLIterator<K> Returns an iterator that iterates over the map’s keyshasKey(K key) returns bool Returns whether this map uses the given keyremoveValue(V val, bool all) Removes either a single occurence or all occurences from of the value from the mapaddAll(IterableMap<K, V> map) Copies all elements from another map into this one Use with caution, since it will replace elements that were under the same key!copy() returns IterableMap<K, V> Returns a shallow copy of this mapoverride function size() returns int Returns the length of this IterableMap *forEach(IMItrClosure<K, V> itr) returns IterableMap<K, V> Executes the closure for each key-value pairpublic interface IMItrClosure<K, V>
Members:
run(K key, V value)