public class TUnmodifiableByteByteMap extends java.lang.Object implements TByteByteMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableByteByteMap(TByteByteMap m) |
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(byte key,
byte adjust_amount,
byte put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(byte key,
byte amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(byte key)
Checks for the present of key in the keys of the map.
|
boolean |
containsValue(byte val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TByteByteProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TByteProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TByteProcedure procedure)
Executes procedure for each value in the map.
|
byte |
get(byte key)
Retrieves the value for key.
|
byte |
getNoEntryKey()
Returns the value that will be returned from
TByteByteMap.get(byte) or TByteByteMap.put(byte, byte) if no
entry exists for a given key. |
byte |
getNoEntryValue()
Returns the value that will be returned from
TByteByteMap.get(byte) or TByteByteMap.put(byte, byte) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(byte key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TByteByteIterator |
iterator() |
byte[] |
keys()
Returns the keys of the map as an array of byte values.
|
byte[] |
keys(byte[] array)
Returns the keys of the map.
|
TByteSet |
keySet()
Returns the keys of the map as a TByteSet
|
byte |
put(byte key,
byte value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TByteByteMap m)
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(byte key,
byte value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
byte |
remove(byte key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TByteByteProcedure procedure)
Retains only those entries in the map for which the procedure
returns a true value.
|
int |
size()
Returns an int value that is the number of elements in the map.
|
java.lang.String |
toString() |
void |
transformValues(TByteFunction function)
Transform the values in this map using function.
|
TByteCollection |
valueCollection()
Returns the values of the map as a TByteCollection
|
byte[] |
values()
Returns the values of the map as an array of #e# values.
|
byte[] |
values(byte[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableByteByteMap(TByteByteMap m)
public int size()
TByteByteMapsize in interface TByteByteMappublic boolean isEmpty()
TByteByteMapisEmpty in interface TByteByteMappublic boolean containsKey(byte key)
TByteByteMapcontainsKey in interface TByteByteMappublic boolean containsValue(byte val)
TByteByteMapcontainsValue in interface TByteByteMappublic byte get(byte key)
TByteByteMapget in interface TByteByteMapTByteByteMap.getNoEntryValue()).public byte put(byte key,
byte value)
TByteByteMapput in interface TByteByteMapTByteByteMap.getNoEntryValue()).public byte remove(byte key)
TByteByteMapremove in interface TByteByteMapkey - an byte valueTByteByteMap.getNoEntryValue()).public void putAll(TByteByteMap m)
TByteByteMapputAll in interface TByteByteMapm - The map from which entries will be obtained to put into this map.public void putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> map)
TByteByteMapputAll in interface TByteByteMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TByteByteMapclear in interface TByteByteMappublic TByteSet keySet()
TByteByteMapkeySet in interface TByteByteMappublic byte[] keys()
TByteByteMapkeys in interface TByteByteMappublic byte[] keys(byte[] array)
TByteByteMapkeys in interface TByteByteMaparray - the array into which the elements of the list are to be stored,
if it is big enough; otherwise, a new array of the same type is
allocated for this purpose.public TByteCollection valueCollection()
TByteByteMapvalueCollection in interface TByteByteMappublic byte[] values()
TByteByteMapvalues in interface TByteByteMappublic byte[] values(byte[] array)
TByteByteMapvalues in interface TByteByteMaparray - the array into which the elements of the list are to be stored,
if it is big enough; otherwise, a new array of the same type is
allocated for this purpose.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte getNoEntryKey()
TByteByteMapTByteByteMap.get(byte) or TByteByteMap.put(byte, byte) if no
entry exists for a given key. The default value is generally zero, but can be
configured during construction of the collection.getNoEntryKey in interface TByteByteMappublic byte getNoEntryValue()
TByteByteMapTByteByteMap.get(byte) or TByteByteMap.put(byte, byte) if no
entry exists for a given key. The default value is generally zero, but can be
configured during construction of the collection.getNoEntryValue in interface TByteByteMappublic boolean forEachKey(TByteProcedure procedure)
TByteByteMapforEachKey in interface TByteByteMapprocedure - a TByteProcedure valuepublic boolean forEachValue(TByteProcedure procedure)
TByteByteMapforEachValue in interface TByteByteMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TByteByteProcedure procedure)
TByteByteMapforEachEntry in interface TByteByteMapprocedure - a TOByteByteProcedure valuepublic TByteByteIterator iterator()
iterator in interface TByteByteMappublic byte putIfAbsent(byte key,
byte value)
TByteByteMapputIfAbsent in interface TByteByteMapTByteByteMap.getNoEntryValue()).public void transformValues(TByteFunction function)
TByteByteMaptransformValues in interface TByteByteMapfunction - a TByteFunction valuepublic boolean retainEntries(TByteByteProcedure procedure)
TByteByteMapretainEntries in interface TByteByteMapprocedure - determines which entries to keeppublic boolean increment(byte key)
TByteByteMapincrement in interface TByteByteMapkey - the key of the value to incrementpublic boolean adjustValue(byte key,
byte amount)
TByteByteMapadjustValue in interface TByteByteMapkey - the key of the value to incrementamount - the amount to adjust the value by.public byte adjustOrPutValue(byte key,
byte adjust_amount,
byte put_amount)
TByteByteMapadjustOrPutValue in interface TByteByteMapkey - the key of the value to incrementadjust_amount - the amount to adjust the value byput_amount - the value put into the map if the key is not present