public class TObjectIntHashMapDecorator<V>
extends java.util.AbstractMap<V,java.lang.Integer>
implements java.util.Map<V,java.lang.Integer>
| Modifier and Type | Field and Description |
|---|---|
protected TObjectIntHashMap<V> |
_map
the wrapped primitive map
|
| Constructor and Description |
|---|
TObjectIntHashMapDecorator(TObjectIntHashMap<V> map)
Creates a wrapper that decorates the specified primitive map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empties the map.
|
boolean |
containsKey(java.lang.Object key)
Checks for the present of key in the keys of the map.
|
boolean |
containsValue(java.lang.Object val)
Checks for the presence of val in the values of the map.
|
java.util.Set<java.util.Map.Entry<V,java.lang.Integer>> |
entrySet()
Returns a Set view on the entries of the map.
|
boolean |
equals(java.lang.Object other)
Compares this map with another map for equality of their stored
entries.
|
java.lang.Integer |
get(java.lang.Object key)
Retrieves the value for key
|
boolean |
isEmpty()
Indicates whether map has any entries.
|
java.lang.Integer |
put(V key,
java.lang.Integer value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends V,? extends java.lang.Integer> map)
Copies the key/value mappings in map into this map.
|
java.lang.Integer |
remove(java.lang.Object key)
Deletes a key/value pair from the map.
|
int |
size()
Returns the number of entries in the map.
|
protected V |
unwrapKey(java.lang.Object key)
Unwraps a key
|
protected int |
unwrapValue(java.lang.Object value)
Unwraps a value
|
protected V |
wrapKey(java.lang.Object o)
Wraps a key
|
protected java.lang.Integer |
wrapValue(int k)
Wraps a value
|
protected final TObjectIntHashMap<V> _map
public TObjectIntHashMapDecorator(TObjectIntHashMap<V> map)
public java.lang.Integer put(V key, java.lang.Integer value)
public boolean equals(java.lang.Object other)
public java.lang.Integer get(java.lang.Object key)
public void clear()
public java.lang.Integer remove(java.lang.Object key)
public java.util.Set<java.util.Map.Entry<V,java.lang.Integer>> entrySet()
public boolean containsValue(java.lang.Object val)
public boolean containsKey(java.lang.Object key)
public int size()
public boolean isEmpty()
public void putAll(java.util.Map<? extends V,? extends java.lang.Integer> map)
protected final V wrapKey(java.lang.Object o)
o - key in the underlying mapprotected final V unwrapKey(java.lang.Object key)
key - wrapped keyprotected java.lang.Integer wrapValue(int k)
k - value in the underlying mapprotected int unwrapValue(java.lang.Object value)
value - wrapped value