public class ObjectIntIdentityMap<T> extends java.lang.Object implements IObjectIntIterable<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.IdentityHashMap<T,java.lang.Integer> |
identityMap |
protected int |
nextId |
protected java.util.List<T> |
objectList |
Constructor and Description |
---|
ObjectIntIdentityMap() |
ObjectIntIdentityMap(int expectedSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(T key) |
int |
get(T key) |
T |
getByValue(int value) |
java.util.Iterator<T> |
iterator() |
void |
put(T key,
int value) |
int |
size() |
protected int nextId
protected final java.util.IdentityHashMap<T,java.lang.Integer> identityMap
protected final java.util.List<T> objectList
public ObjectIntIdentityMap()
public ObjectIntIdentityMap(int expectedSize)
public void put(T key, int value)
public void add(T key)
public int get(T key)
@Nullable public final T getByValue(int value)
getByValue
in interface IObjectIntIterable<T>
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public int size()