|
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.ObjectKeyIntMapToMapAdapter
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.
ObjectKeyIntMap,
Map| Field Summary | |
protected ObjectKeyIntMap |
map
The underlying primitive map. |
| Constructor Summary | |
ObjectKeyIntMapToMapAdapter(ObjectKeyIntMap map)
Creates a new adaption of a primitive map of object keys and int 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 ObjectKeyIntMap map
| Constructor Detail |
public ObjectKeyIntMapToMapAdapter(ObjectKeyIntMap 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)
containsKey in interface Mapkey - 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 Integer.
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)
get in interface Mapkey - the key to map to a value.
public int hashCode()
hashCode in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Set keySet()
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 value is null.
ClassCastException - if value is not of class Integer.
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 value in map is null.
ClassCastException - if a value in value is not of class Integer.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()
Integer.
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 | |||||||||