public final class HashedMapIntInt extends Object
See HashedMap.java for additional comments throughout the code, since the classes are so similiar.
See HashedMapIntKey.java for the prime example of mapping HashedMap to primitive types.
The missing java.util.Map methods are: putAll(), keySet(), entrySet()
The equivalent functionality is provided by: iteratorInit(), iteratorHasNext(), iteratorNextEntry(), iteratorNextKey()
Beware that this class is single-threaded and non-reentrant. Also note that this class's iterators are not fail-fast, unlike HashedMap.
Constructor and Description |
---|
HashedMapIntInt() |
HashedMapIntInt(int initcap) |
HashedMapIntInt(int initcap,
float factor) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(int key) |
boolean |
containsValue(int val) |
int |
get(int key) |
int[] |
getKeys(int[] keys) |
boolean |
isEmpty() |
IteratorInt |
keysIterator() |
int |
put(int key,
int value) |
IteratorInt |
recycledKeysIterator() |
IteratorInt |
recycledValuesIterator() |
int |
remove(int key) |
int |
size() |
String |
toString() |
int |
trimToSize() |
IteratorInt |
valuesIterator() |
public HashedMapIntInt()
public HashedMapIntInt(int initcap)
public HashedMapIntInt(int initcap, float factor)
public boolean isEmpty()
public int size()
public void clear()
public boolean containsKey(int key)
public boolean containsValue(int val)
public int get(int key)
public int put(int key, int value)
public int remove(int key)
public int trimToSize()
public int[] getKeys(int[] keys)
public IteratorInt keysIterator()
public IteratorInt valuesIterator()
public IteratorInt recycledKeysIterator()
public IteratorInt recycledValuesIterator()
Copyright 2010-2018 Grey Software (Yusef Badri). All Rights Reserved.