|
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.adapter.ObjectKeyFloatMapToMapAdapter
This class represents adapters of primitive maps from
object values to values to Java Collections
Framework maps. The adapter is implemented as a wrapper
around a primitive map. Thus,
changes to the underlying map are reflected by this
map and vice versa.
ObjectKeyFloatMap
,
Map
Field Summary | |
protected ObjectKeyFloatMap |
map
The underlying primitive map. |
Constructor Summary | |
ObjectKeyFloatMapToMapAdapter(ObjectKeyFloatMap map)
Creates a new adaption of a primitive map of object keys and float values to a Java Collections Framework map. |
Method Summary | |
void |
clear()
Clears this map. |
boolean |
containsKey(Object key)
Indicates whether this map contains a mapping from a specified key. |
boolean |
containsValue(Object value)
Indicates whether this map contains a mapping to a specified value. |
Set |
entrySet()
Returns a set view of the entries of this map. |
boolean |
equals(Object obj)
Indicates whether this map is equal to some object. |
Object |
get(Object 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. |
Set |
keySet()
Returns a set view of the keys of this map. |
Object |
put(Object key,
Object value)
Adds a mapping from a specified key to a specified value to this map. |
void |
putAll(Map map)
Adds all mappings from a specified map to this map. |
Object |
remove(Object key)
Removes the mapping from a specified key from this map. |
int |
size()
Returns the size of this map. |
Collection |
values()
Returns a collection view of the values in this map. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ObjectKeyFloatMap map
Constructor Detail |
public ObjectKeyFloatMapToMapAdapter(ObjectKeyFloatMap map) throws NullPointerException
map
- the underlying primitive map.
NullPointerException
- if map is null.Method Detail |
public void clear()
clear
in interface Map
UnsupportedOperationException
- if the operation is not supported by the
underlying map.public boolean containsKey(Object key)
containsKey
in interface Map
key
- the key to test for.
public boolean containsValue(Object value)
Note that this map can never contain null
values or values of other classes than Float
.
In those cases, this method will return false.
containsValue
in interface Map
value
- the value to test for.
public Set entrySet()
java.util.Map.Entry
.
entrySet
in interface Map
public boolean equals(Object obj)
equals
in interface Map
obj
- the object with which to compare this map.
public Object get(Object key)
get
in interface Map
key
- the key to map to a value.
public int hashCode()
hashCode
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Set keySet()
keySet
in interface Map
public Object put(Object key, Object value) throws NullPointerException, ClassCastException
put
in interface Map
key
- the key of the mapping to add to this map.value
- the value of the mapping to add to this map.
UnsupportedOperationException
- if the operation is not supported by this map.
NullPointerException
- if value is null.
ClassCastException
- if value is not of class Float
.public void putAll(Map map) throws NullPointerException, ClassCastException
putAll
in interface Map
map
- the map whose mappings to add to this map.
NullPointerException
- if map is null.
UnsupportedOperationException
- if the operation is not supported by this map.
NullPointerException
- if a value in map is null.
ClassCastException
- if a value in value is not of class Float
.public Object remove(Object key)
remove
in interface Map
key
- the key whose mapping to remove from this map.
UnsupportedOperationException
- if the operation is not supported by the
underlying map.public int size()
size
in interface Map
public Collection values()
Float
.
values
in interface Map
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |