|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.util.IntMap
A map that uses integer keys and values
Constructor Summary | |
IntMap()
Creates a new map |
|
IntMap(IntMap im)
Copy constructor |
Method Summary | |
void |
clear()
Removes all values from the set |
boolean |
containsKey(int key)
Returns true if this map contains a given key |
int |
get(int key,
int defaultValue)
Returns the value associated with a key |
void |
put(int key,
int val)
Adds a key to set |
void |
remove(int key)
Removes a key from the map |
int |
size()
Returns the size of the set |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IntMap()
public IntMap(IntMap im)
im
- IntMap to be copied.Method Detail |
public int size()
public void clear()
public void put(int key, int val)
public void remove(int key)
public int get(int key, int defaultValue)
key
- Key to retrieve associated valuedefaultValue
- Value to return if key is not in mappublic boolean containsKey(int key)
key
- Key to verify existence
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |