|
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.adapter.CharKeyLongMapToMapAdapter
This class represents adapters of primitive maps from char values to long 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.
CharKeyLongMap,
Map| Field Summary | |
protected CharKeyLongMap |
map
The underlying primitive map. |
| Constructor Summary | |
CharKeyLongMapToMapAdapter(CharKeyLongMap map)
Creates a new adaption of a primitive map of char keys and long 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 CharKeyLongMap map
| Constructor Detail |
public CharKeyLongMapToMapAdapter(CharKeyLongMap map)
throws NullPointerException
map - the underlying primitive map.
NullPointerException - if map is null.| Method Detail |
public void clear()
clear in interface MapUnsupportedOperationException - if the operation is not supported by the
underlying map.
public boolean containsKey(Object key)
throws NullPointerException,
ClassCastException
containsKey in interface Mapkey - the key to test for.
NullPointerException - if key is null.
ClassCastException - if key is not of class Character.public boolean containsValue(Object value)
Note that this map can never contain null
values or values of other classes than Long.
In those cases, this method will return false.
containsValue in interface Mapvalue - the value to test for.
public Set entrySet()
java.util.Map.Entry.
entrySet in interface Mappublic boolean equals(Object obj)
equals in interface Mapobj - the object with which to compare this map.
public Object get(Object key)
throws NullPointerException,
ClassCastException
Long.
get in interface Mapkey - the key to map to a value.
NullPointerException - if key is null.
ClassCastException - if key is not of class Character.public int hashCode()
hashCode in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Set keySet()
Character.
keySet in interface Map
public Object put(Object key,
Object value)
throws NullPointerException,
ClassCastException
put in interface Mapkey - 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 Character;
if value is not of class Long.
public void putAll(Map map)
throws NullPointerException,
ClassCastException
putAll in interface Mapmap - 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;
if a value in map is null.
ClassCastException - if a key in map is not of class Character;
if a value in value is not of class Long.public Object remove(Object key)
remove in interface Mapkey - 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 Mappublic Collection values()
Long.
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 | |||||||||