|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoot.toolkits.scalar.ObjectIntMapper<E>
public class ObjectIntMapper<E>
gives an injection of Objects to ints. Different instances of
ObjectIntMap may map different ints to the same object.
| Constructor Summary | |
|---|---|
ObjectIntMapper()
|
|
ObjectIntMapper(Collection<E> collection)
|
|
ObjectIntMapper(FlowUniverse<E> flowUniverse)
|
|
| Method Summary | |
|---|---|
int |
add(E o)
adds o into the map. |
boolean |
contains(Object o)
returns true, if o has already been mapped. |
int |
getInt(E o)
returns the mapping of o. |
Object |
getObject(int i)
returns the object associated to i. |
int |
size()
returns the number of mapped objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectIntMapper()
public ObjectIntMapper(FlowUniverse<E> flowUniverse)
public ObjectIntMapper(Collection<E> collection)
| Method Detail |
|---|
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 Object getObject(int i)
i.
i -
i's objectpublic boolean contains(Object o)
o has already been mapped.
o -
o has already a number.public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||