| |
|
| java.lang.Object bak.pcj.adapter.ObjectKeyFloatMapToMapAdapter
ObjectKeyFloatMapToMapAdapter | public class ObjectKeyFloatMapToMapAdapter implements Map(Code) | | 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.
See Also: ObjectKeyFloatMap See Also: java.util.Map author: Søren Bak version: 1.1 20-08-2003 23:09 since: 1.1 |
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. |
ObjectKeyFloatMapToMapAdapter | public ObjectKeyFloatMapToMapAdapter(ObjectKeyFloatMap map) throws NullPointerException(Code) | | Creates a new adaption of a primitive map of object
keys and float 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)(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. |
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
Float Float .
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. |
get | public Object get(Object key)(Code) | | Maps a specified key to a value. Returns null
if no mapping exists for the specified key.
The returned value will always be of class
.
Parameters: key - the key to map to a value. the value that the specified key maps to, ornull, if no such mapping exists. |
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.
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 value is null. throws: ClassCastException - if value is not of class Float Float. |
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
Float Float .
a collection view of the values in this map. |
|
|
|