public class IntMap<V:>
O(1) integer-keyed map with compiler-specialized value storage.
JASS hashtables use integer child keys, so fixing the key type avoids an artificial generic hash adapter while V: keeps strings, reals, booleans, handles, tuples, and class references in typed arrays. Removal is unordered. The map does not own stored values.
has(int key) returns booleanReturns whether a value exists under the given key.
put(int key, V value)Inserts or replaces a value. Existing key order is retained.
get(int key) returns VReturns the stored value, or the type’s null/default value when absent.
remove(int key) returns booleanRemoves a key/value pair and returns whether it was present.
getAndRemove(int key) returns VRetrieves a value and removes its key/value pair.
clear()Removes every entry while retaining allocated list capacity.
size() returns intReturns the number of entries.
isEmpty() returns booleanReturns whether the map is empty.
keyAt(int index) returns intReturns a key by dense index. Removal may change this order.
valueAt(int index) returns VReturns a value by dense index. Removal may change this order.