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