|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbak.pcj.map.AbstractIntKeyIntMap
This class represents an abstract base for implementing maps from int values to int values. All operations that can be implemented using iterators are implemented as such. In most cases, this is hardly an efficient solution, and at least some of those methods should be overridden by sub-classes.
| Constructor Summary | |
protected |
AbstractIntKeyIntMap()
Default constructor to be invoked by sub-classes. |
| Method Summary | |
void |
clear()
Clears this map. |
boolean |
containsKey(int key)
Indicates whether this map contains a mapping from a specified key. |
boolean |
containsValue(int value)
Indicates whether this map contains a mapping to a specified value. |
boolean |
equals(Object obj)
Indicates whether this map is equal to some object. |
int |
get(int key)
Maps a specified key to a value. |
int |
hashCode()
Returns a hash code value for this map. |
boolean |
isEmpty()
Indicates whether this map is empty. |
void |
putAll(IntKeyIntMap map)
Adds all mappings from a specified map to this map. |
int |
remove(int key)
Removes the mapping from a specified key from this map. |
int |
size()
Returns the size of this map. |
int |
tget(int key)
Maps a specified key to a value. |
String |
toString()
Returns a string representation of this map. |
void |
trimToSize()
Does nothing. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface bak.pcj.map.IntKeyIntMap |
entries, keySet, lget, put, values |
| Constructor Detail |
protected AbstractIntKeyIntMap()
| Method Detail |
public void clear()
IntKeyIntMap
clear in interface IntKeyIntMappublic int remove(int key)
IntKeyIntMap
remove in interface IntKeyIntMapkey - the key whose mapping to remove from this map.
MapDefaultspublic void putAll(IntKeyIntMap map)
IntKeyIntMap
putAll in interface IntKeyIntMapmap - the map whose mappings to add to this map.public boolean containsKey(int key)
IntKeyIntMaplget() will return the corresponding value.
containsKey in interface IntKeyIntMapkey - the key to test for.
IntKeyIntMap.lget()public int get(int key)
IntKeyIntMap
get in interface IntKeyIntMapkey - the key to map to a value.
MapDefaults,
IntKeyIntMap.tget(int),
IntKeyIntMap.lget()public boolean containsValue(int value)
IntKeyIntMap
containsValue in interface IntKeyIntMapvalue - the value to test for.
public boolean equals(Object obj)
IntKeyIntMap
equals in interface IntKeyIntMappublic int hashCode()
IntKeyIntMap
hashCode in interface IntKeyIntMappublic boolean isEmpty()
IntKeyIntMap
isEmpty in interface IntKeyIntMappublic int size()
IntKeyIntMap
size in interface IntKeyIntMappublic int tget(int key)
IntKeyIntMap
tget in interface IntKeyIntMapkey - the key to map to a value.
IntKeyIntMap.get(int),
IntKeyIntMap.lget()public String toString()
public void trimToSize()
trimToSize in interface IntKeyIntMap
|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||