gnu.trove.decorator
public class TIntDoubleHashMapDecorator extends AbstractMap implements Map
Note that wrapping and unwrapping primitive values is extremely inefficient. If possible, users of this class should override the appropriate methods in this class and use a table of canonical values.
Created: Mon Sep 23 22:07:40 PDT 2002Since: trove 0.1.8
Version: $Id: TIntDoubleHashMapDecorator.java,v 1.1 2002/09/25 05:10:08 ericdf Exp $
Field Summary | |
---|---|
protected TIntDoubleHashMap | _map the wrapped primitive map |
Constructor Summary | |
---|---|
TIntDoubleHashMapDecorator(TIntDoubleHashMap map)
Creates a wrapper that decorates the specified primitive map. |
Method Summary | |
---|---|
void | clear()
Empties the map. |
boolean | containsKey(Object key)
Checks for the present of key in the keys of the map.
|
boolean | containsValue(Object val)
Checks for the presence of val in the values of the map.
|
Set | entrySet()
Returns a Set view on the entries of the map.
|
boolean | equals(Object other)
Compares this map with another map for equality of their stored
entries.
|
Object | get(Object key)
Retrieves the value for key
|
boolean | isEmpty()
Indicates whether map has any entries. |
Object | put(Object key, Object value)
Inserts a key/value pair into the map.
|
void | putAll(Map map)
Copies the key/value mappings in map into this map.
|
Object | remove(Object key)
Deletes a key/value pair from the map.
|
int | size()
Returns the number of entries in the map. |
protected int | unwrapKey(Object key)
Unwraps a key
|
protected double | unwrapValue(Object value)
Unwraps a value
|
protected Integer | wrapKey(int k)
Wraps a key
|
protected Double | wrapValue(double k)
Wraps a value
|
Parameters: key an Object
value
Returns: a boolean
value
Parameters: val an Object
value
Returns: a boolean
value
Returns: a Set
value
Parameters: other an Object
value
Returns: true if the maps are identical
Parameters: key an Object
value
Returns: the value of key or null if no such mapping exists.
Returns: true if the map is empty
Parameters: key an Object
value value an Object
value
Returns: the previous value associated with key, or Integer(0) if none was found.
Parameters: map a Map
value
Parameters: key an Object
value
Returns: the removed value, or Integer(0) if it was not found in the map
Returns: the map's size.
Parameters: a wrapped key
Returns: an unwrapped representation of the key
Parameters: a wrapped value
Returns: an unwrapped representation of the value
Parameters: a key in the underlying map
Returns: an Object representation of the key
Parameters: a value in the underlying map
Returns: an Object representation of the value