|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mark.core.util.ObjectMap
An ObjectMap associates each object in a set of objects with a unique integer in the range 0..numObjects - 1.
| Constructor Summary | |
ObjectMap()
Initializes the map. |
|
ObjectMap(java.util.Collection objects)
Initializes the map and associates the given objects. |
|
ObjectMap(java.lang.Object[] objects)
Initializes the map and associates the given objects. |
|
ObjectMap(ObjectMap objects)
Initializes the map and associates the given objects. |
|
| Method Summary | |
void |
add(java.lang.Object o)
If a mapping for the given object does not exist, adds one. |
java.lang.Object |
map(int i)
Given an integer, returns the corresponding object. |
int |
map(java.lang.Object o)
Given an object, returns the corresponding integer. |
int |
size()
returns the number of mappings. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ObjectMap()
public ObjectMap(java.lang.Object[] objects)
objects - the objects to associate.public ObjectMap(java.util.Collection objects)
objects - the objects to associate.public ObjectMap(ObjectMap objects)
objects - the objects to associate.| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic void add(java.lang.Object o)
o - the new object.public java.lang.Object map(int i)
i - the integer.
public int map(java.lang.Object o)
o - the object.
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||