public class TFloatIntHashMapDecorator 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 2002AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected TFloatIntHashMap |
_map
the wrapped primitive map
|
| Constructor and Description |
|---|
TFloatIntHashMapDecorator(TFloatIntHashMap map)
Creates a wrapper that decorates the specified primitive map.
|
| Modifier and Type | Method and Description |
|---|---|
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 float |
unwrapKey(Object key)
Unwraps a key
|
protected int |
unwrapValue(Object value)
Unwraps a value
|
protected Float |
wrapKey(float k)
Wraps a key
|
protected Integer |
wrapValue(int k)
Wraps a value
|
finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, valuesprotected final TFloatIntHashMap _map
public TFloatIntHashMapDecorator(TFloatIntHashMap map)
public Object put(Object key, Object value)
put in interface Mapput in class AbstractMapkey - an Object valuevalue - an Object valuepublic boolean equals(Object other)
equals in interface Mapequals in class AbstractMapother - an Object valuepublic Object get(Object key)
get in interface Mapget in class AbstractMapkey - an Object valuepublic void clear()
clear in interface Mapclear in class AbstractMappublic Object remove(Object key)
remove in interface Mapremove in class AbstractMapkey - an Object valuepublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMapSet valuepublic boolean containsValue(Object val)
containsValue in interface MapcontainsValue in class AbstractMapval - an Object valueboolean valuepublic boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class AbstractMapkey - an Object valueboolean valuepublic int size()
size in interface Mapsize in class AbstractMappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractMappublic void putAll(Map map)
putAll in interface MapputAll in class AbstractMapmap - a Map valueprotected Float wrapKey(float k)
a - key in the underlying mapprotected float unwrapKey(Object key)
a - wrapped keyprotected Integer wrapValue(int k)
a - value in the underlying mapprotected int unwrapValue(Object value)
a - wrapped valueCopyright © 2019 JULIE Lab, Germany. All rights reserved.