| |
|
| java.lang.Object bak.pcj.adapter.BooleanKeyByteMapToMapAdapter
BooleanKeyByteMapToMapAdapter | public class BooleanKeyByteMapToMapAdapter implements Map(Code) | | This class represents adapters of primitive maps from
boolean values to byte 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.
See Also: BooleanKeyByteMap See Also: java.util.Map author: Søren Bak version: 1.4 20-08-2003 23:03 since: 1.0 |
Inner Class :class Entry implements Map.Entry | |
Method Summary | |
public void | clear() Clears this map. | public boolean | containsKey(Object key) Indicates whether this map contains a mapping from a specified
key. | public boolean | containsValue(Object value) Indicates whether this map contains a mapping to a specified
value. | public Set | entrySet() Returns a set view of the entries of this map. | public boolean | equals(Object obj) Indicates whether this map is equal to some object.
Parameters: obj - the object with which to compare this map. | public Object | get(Object key) Maps a specified key to a value. | public int | hashCode() Returns a hash code value for this map. | public boolean | isEmpty() Indicates whether this map is empty. | public Set | keySet() Returns a set view of the keys of this map. | public Object | put(Object key, Object value) Adds a mapping from a specified key to a specified value to
this map. | public void | putAll(Map map) Adds all mappings from a specified map to this map. | public Object | remove(Object key) Removes the mapping from a specified key from this map.
The mapping is removed from the underlying map.
Parameters: key - the key whose mapping to remove from this map. | public int | size() Returns the size of this map. | public Collection | values() Returns a collection view of the values in this map. |
BooleanKeyByteMapToMapAdapter | public BooleanKeyByteMapToMapAdapter(BooleanKeyByteMap map) throws NullPointerException(Code) | | Creates a new adaption of a primitive map of boolean
keys and byte values to a Java Collections Framework map.
Parameters: map - the underlying primitive map. throws: NullPointerException - if map is null. |
containsKey | public boolean containsKey(Object key) throws NullPointerException, ClassCastException(Code) | | Indicates whether this map contains a mapping from a specified
key. This is so, only if the underlying collection contains
the unwrapped key.
Parameters: key - the key to test for. true if this map contains a mapping fromthe specified key; returns falseotherwise. throws: NullPointerException - if key is null. throws: ClassCastException - if key is not of class Boolean Boolean. |
containsValue | public boolean containsValue(Object value)(Code) | | Indicates whether this map contains a mapping to a specified
value. For this map to contain an object, the
underlying map must contain its unwrapped value.
Note that this map can never contain null
values or values of other classes than
Byte Byte .
In those cases, this method will return false.
Parameters: value - the value to test for. true if this map contains at least onemapping to the specified value; returnsfalse otherwise. |
entrySet | public Set entrySet()(Code) | | Returns a set view of the entries of this map. The returned
set is a view, so changes to this map are reflected by the
returned set and vice versa. All elements of the returned
set implements
java.util.Map.Entry java.util.Map.Entry .
a set view of the entries of this map. |
equals | public boolean equals(Object obj)(Code) | | Indicates whether this map is equal to some object.
Parameters: obj - the object with which to compare this map. true if this map is equal to thespecified object; returns falseotherwise. |
hashCode | public int hashCode()(Code) | | Returns a hash code value for this map. The hash code
returned is that of the underlying map.
a hash code value for this map. |
isEmpty | public boolean isEmpty()(Code) | | Indicates whether this map is empty.
true if this map is empty; returnsfalse otherwise. |
keySet | public Set keySet()(Code) | | Returns a set view of the keys of this map. Removals from the
returned set removes the corresponding entries in this map.
Changes to the map are reflected in the set. All elements
if the returned set is of class
Boolean Boolean .
a set view of the keys of this map. |
put | public Object put(Object key, Object value) throws NullPointerException, ClassCastException(Code) | | Adds a mapping from a specified key to a specified value to
this map. If a mapping already exists for the specified key
it is overwritten by the new mapping. The mapping is
added to the underlying map.
Parameters: key - the key of the mapping to add to this map. Parameters: value - the value of the mapping to add to this map. the old value if amapping from the specified key already existedin this map; returns null otherwise. throws: UnsupportedOperationException - if the operation is not supported by this map. throws: NullPointerException - if key is null;if value is null. throws: ClassCastException - if key is not of class Boolean Boolean;if value is not of class Byte Byte. |
remove | public Object remove(Object key)(Code) | | Removes the mapping from a specified key from this map.
The mapping is removed from the underlying map.
Parameters: key - the key whose mapping to remove from this map. the old value if amapping from the specified key already existedin this map; returns null otherwise. throws: UnsupportedOperationException - if the operation is not supported by the underlying map. |
size | public int size()(Code) | | Returns the size of this map. The size is defined as the
number of mappings from keys to values. The size is that
of the underlying map.
the size of this map. |
values | public Collection values()(Code) | | Returns a collection view of the values in this map. The
collection is not modifiable, but changes to the map are
reflected in the collection. All elements
in the returned set is of class
Byte Byte .
a collection view of the values in this map. |
|
|
|