|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.map.AbstractDoubleKeyIntMap
This class represents an abstract base for implementing maps from double 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 |
AbstractDoubleKeyIntMap()
Default constructor to be invoked by sub-classes. |
Method Summary | |
void |
clear()
Clears this map. |
boolean |
containsKey(double 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(double 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(DoubleKeyIntMap map)
Adds all mappings from a specified map to this map. |
int |
remove(double key)
Removes the mapping from a specified key from this map. |
int |
size()
Returns the size of this map. |
int |
tget(double 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.DoubleKeyIntMap |
entries, keySet, lget, put, values |
Constructor Detail |
protected AbstractDoubleKeyIntMap()
Method Detail |
public void clear()
DoubleKeyIntMap
clear
in interface DoubleKeyIntMap
public int remove(double key)
DoubleKeyIntMap
remove
in interface DoubleKeyIntMap
key
- the key whose mapping to remove from this map.
MapDefaults
public void putAll(DoubleKeyIntMap map)
DoubleKeyIntMap
putAll
in interface DoubleKeyIntMap
map
- the map whose mappings to add to this map.public boolean containsKey(double key)
DoubleKeyIntMap
lget()
will return the corresponding value.
containsKey
in interface DoubleKeyIntMap
key
- the key to test for.
DoubleKeyIntMap.lget()
public int get(double key)
DoubleKeyIntMap
get
in interface DoubleKeyIntMap
key
- the key to map to a value.
MapDefaults
,
DoubleKeyIntMap.tget(double)
,
DoubleKeyIntMap.lget()
public boolean containsValue(int value)
DoubleKeyIntMap
containsValue
in interface DoubleKeyIntMap
value
- the value to test for.
public boolean equals(Object obj)
DoubleKeyIntMap
equals
in interface DoubleKeyIntMap
public int hashCode()
DoubleKeyIntMap
hashCode
in interface DoubleKeyIntMap
public boolean isEmpty()
DoubleKeyIntMap
isEmpty
in interface DoubleKeyIntMap
public int size()
DoubleKeyIntMap
size
in interface DoubleKeyIntMap
public int tget(double key)
DoubleKeyIntMap
tget
in interface DoubleKeyIntMap
key
- the key to map to a value.
DoubleKeyIntMap.get(double)
,
DoubleKeyIntMap.lget()
public String toString()
public void trimToSize()
trimToSize
in interface DoubleKeyIntMap
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |