public class TByteIntMapDecorator extends AbstractMap<Byte ,Integer > implements Map <Byte ,Integer >, Externalizable , Cloneable
AbstractMap.SimpleEntry <K,V>, AbstractMap.SimpleImmutableEntry <K,V> | Modifier and Type | Field and Description |
|---|---|
protected TByteIntMap |
_map
the wrapped primitive map
|
| Constructor and Description |
|---|
TByteIntMapDecorator()
FOR EXTERNALIZATION ONLY!!
|
TByteIntMapDecorator(TByteIntMap
Creates a wrapper that decorates the specified primitive map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empties the map.
|
boolean |
containsKey(Object
Checks for the present of
key in the keys of the map.
|
boolean |
containsValue(Object
Checks for the presence of
val in the values of the map.
|
Set |
entrySet()
Returns a Set view on the entries of the map.
|
Integer |
get(Object
Retrieves the value for
key
|
TByteIntMap |
getMap()
Returns a reference to the map wrapped by this decorator.
|
boolean |
isEmpty()
Indicates whether map has any entries.
|
Integer |
put(Byte
Inserts a key/value pair into the map.
|
void |
putAll(Map
Copies the key/value mappings in
map into this map.
|
void |
readExternal(ObjectInput
|
Integer |
remove(Object
Deletes a key/value pair from the map.
|
int |
size()
Returns the number of entries in the map.
|
protected byte |
unwrapKey(Object
Unwraps a key
|
protected int |
unwrapValue(Object
Unwraps a value
|
protected Byte |
wrapKey(byte k)
Wraps a key
|
protected Integer |
wrapValue(int k)
Wraps a value
|
void |
writeExternal(ObjectOutput
|
finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, valuesprotected TByteIntMap_map
public TByteIntMapDecorator()
public TByteIntMapDecorator(TByteIntMapmap)
map - the
TByteIntMap to wrap.
public TByteIntMapgetMap()
public void clear()
public Set<Map .Entry <Byte ,Integer >> entrySet()
public boolean containsValue(Objectval)
containsValue in interface
Map<Byte,Integer>
containsValue in class
AbstractMap<Byte,Integer>
val - an
Object value
boolean value
public boolean containsKey(Objectkey)
containsKey in interface
Map<Byte,Integer>
containsKey in class
AbstractMap<Byte,Integer>
key - an
Object value
boolean value
public int size()
public boolean isEmpty()
public void putAll(Map<? extends Byte ,? extends Integer > map)
protected BytewrapKey(byte k)
k - key in the underlying map
protected byte unwrapKey(Objectkey)
key - wrapped key
protected IntegerwrapValue(int k)
k - value in the underlying map
protected int unwrapValue(Objectvalue)
value - wrapped value
public void readExternal(ObjectInputin) throws IOException , ClassNotFoundException
readExternal in interface
Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutputout) throws IOException
writeExternal in interface
Externalizable
IOException