public class TUnmodifiableShortByteMap extends java.lang.Object implements TShortByteMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableShortByteMap(TShortByteMap m) |
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(short 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(short key,
byte amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(short 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(TShortByteProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TShortProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TByteProcedure procedure)
Executes procedure for each value in the map.
|
byte |
get(short key)
Retrieves the value for key.
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortByteMap.get(short) or TShortByteMap.put(short, byte) if no
entry exists for a given key. |
byte |
getNoEntryValue()
Returns the value that will be returned from
TShortByteMap.get(short) or TShortByteMap.put(short, byte) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(short key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TShortByteIterator |
iterator() |
short[] |
keys()
Returns the keys of the map as an array of short values.
|
short[] |
keys(short[] array)
Returns the keys of the map.
|
TShortSet |
keySet()
Returns the keys of the map as a TShortSet
|
byte |
put(short key,
byte value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TShortByteMap m)
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(short key,
byte value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
byte |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortByteProcedure 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 TUnmodifiableShortByteMap(TShortByteMap m)
public int size()
TShortByteMapsize in interface TShortByteMappublic boolean isEmpty()
TShortByteMapisEmpty in interface TShortByteMappublic boolean containsKey(short key)
TShortByteMapcontainsKey in interface TShortByteMappublic boolean containsValue(byte val)
TShortByteMapcontainsValue in interface TShortByteMappublic byte get(short key)
TShortByteMapget in interface TShortByteMapTShortByteMap.getNoEntryValue()).public byte put(short key,
byte value)
TShortByteMapput in interface TShortByteMapTShortByteMap.getNoEntryValue()).public byte remove(short key)
TShortByteMapremove in interface TShortByteMapkey - an short valueTShortByteMap.getNoEntryValue()).public void putAll(TShortByteMap m)
TShortByteMapputAll in interface TShortByteMapm - The map from which entries will be obtained to put into this map.public void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> map)
TShortByteMapputAll in interface TShortByteMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TShortByteMapclear in interface TShortByteMappublic TShortSet keySet()
TShortByteMapkeySet in interface TShortByteMappublic short[] keys()
TShortByteMapkeys in interface TShortByteMappublic short[] keys(short[] array)
TShortByteMapkeys in interface TShortByteMaparray - 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()
TShortByteMapvalueCollection in interface TShortByteMappublic byte[] values()
TShortByteMapvalues in interface TShortByteMappublic byte[] values(byte[] array)
TShortByteMapvalues in interface TShortByteMaparray - 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 short getNoEntryKey()
TShortByteMapTShortByteMap.get(short) or TShortByteMap.put(short, 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 TShortByteMappublic byte getNoEntryValue()
TShortByteMapTShortByteMap.get(short) or TShortByteMap.put(short, 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 TShortByteMappublic boolean forEachKey(TShortProcedure procedure)
TShortByteMapforEachKey in interface TShortByteMapprocedure - a TShortProcedure valuepublic boolean forEachValue(TByteProcedure procedure)
TShortByteMapforEachValue in interface TShortByteMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TShortByteProcedure procedure)
TShortByteMapforEachEntry in interface TShortByteMapprocedure - a TOShortByteProcedure valuepublic TShortByteIterator iterator()
iterator in interface TShortByteMappublic byte putIfAbsent(short key,
byte value)
TShortByteMapputIfAbsent in interface TShortByteMapTShortByteMap.getNoEntryValue()).public void transformValues(TByteFunction function)
TShortByteMaptransformValues in interface TShortByteMapfunction - a TByteFunction valuepublic boolean retainEntries(TShortByteProcedure procedure)
TShortByteMapretainEntries in interface TShortByteMapprocedure - determines which entries to keeppublic boolean increment(short key)
TShortByteMapincrement in interface TShortByteMapkey - the key of the value to incrementpublic boolean adjustValue(short key,
byte amount)
TShortByteMapadjustValue in interface TShortByteMapkey - the key of the value to incrementamount - the amount to adjust the value by.public byte adjustOrPutValue(short key,
byte adjust_amount,
byte put_amount)
TShortByteMapadjustOrPutValue in interface TShortByteMapkey - 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