|
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.ByteKeyMapToMapAdapter
This class represents adapters of primitive maps from byte values to objects 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.
ByteKeyMap
,
Map
Field Summary | |
protected ByteKeyMap |
map
The underlying primitive map. |
Constructor Summary | |
ByteKeyMapToMapAdapter(ByteKeyMap map)
Creates a new adaption of a primitive map of byte keys 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 ByteKeyMap map
Constructor Detail |
public ByteKeyMapToMapAdapter(ByteKeyMap map)
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.
NullPointerException
- if key is null.
ClassCastException
- if key is not of class Byte
.public boolean containsValue(Object value)
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.
NullPointerException
- if key is null.
ClassCastException
- if key is not of class Byte
.public int hashCode()
hashCode
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Set keySet()
Byte
.
keySet
in interface Map
public Object put(Object key, Object value)
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 key is null;
if value is null.
ClassCastException
- if key is not of class Byte
.public void putAll(Map map)
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 key in map is null.
ClassCastException
- if a key in map is not of class Byte
.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()
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 |