public class ObjectIntMapper<E>
extends java.lang.Object
ObjectIntMap may map different ints to the same object.| Constructor and Description |
|---|
ObjectIntMapper() |
ObjectIntMapper(java.util.Collection<E> collection) |
ObjectIntMapper(FlowUniverse<E> flowUniverse) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(E o)
adds
o into the map. |
boolean |
contains(java.lang.Object o)
returns true, if
o has already been mapped. |
int |
getInt(E o)
returns the mapping of
o. |
E |
getObject(int i)
returns the object associated to
i. |
int |
size()
returns the number of mapped objects.
|
public ObjectIntMapper()
public ObjectIntMapper(FlowUniverse<E> flowUniverse)
public ObjectIntMapper(java.util.Collection<E> collection)
public int add(E o)
o into the map. no test are made, if it is already in the
map.public int getInt(E o)
o. if there has been a call to
objectToInt with the same o before, the same
value will be returned.o - o's mappingpublic E getObject(int i)
i.i - i's objectpublic boolean contains(java.lang.Object o)
o has already been mapped.o - o has already a number.public int size()