public class TUnmodifiableByteShortMap extends java.lang.Object implements TByteShortMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableByteShortMap(TByteShortMap m) |
| Modifier and Type | Method and Description |
|---|---|
short |
adjustOrPutValue(byte key,
short adjust_amount,
short put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(byte key,
short 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(short val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TByteShortProcedure 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(TShortProcedure procedure)
Executes procedure for each value in the map.
|
short |
get(byte key)
Retrieves the value for key.
|
byte |
getNoEntryKey()
Returns the value that will be returned from
TByteShortMap.get(byte) or TByteShortMap.put(byte, short) if no
entry exists for a given key. |
short |
getNoEntryValue()
Returns the value that will be returned from
TByteShortMap.get(byte) or TByteShortMap.put(byte, short) 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.
|
TByteShortIterator |
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
|
short |
put(byte key,
short value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Short> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TByteShortMap m)
Put all the entries from the given map into this map.
|
short |
putIfAbsent(byte key,
short value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
short |
remove(byte key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TByteShortProcedure 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(TShortFunction function)
Transform the values in this map using function.
|
TShortCollection |
valueCollection()
Returns the values of the map as a TShortCollection
|
short[] |
values()
Returns the values of the map as an array of #e# values.
|
short[] |
values(short[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableByteShortMap(TByteShortMap m)
public int size()
TByteShortMapsize in interface TByteShortMappublic boolean isEmpty()
TByteShortMapisEmpty in interface TByteShortMappublic boolean containsKey(byte key)
TByteShortMapcontainsKey in interface TByteShortMappublic boolean containsValue(short val)
TByteShortMapcontainsValue in interface TByteShortMappublic short get(byte key)
TByteShortMapget in interface TByteShortMapTByteShortMap.getNoEntryValue()).public short put(byte key,
short value)
TByteShortMapput in interface TByteShortMapTByteShortMap.getNoEntryValue()).public short remove(byte key)
TByteShortMapremove in interface TByteShortMapkey - an byte valueTByteShortMap.getNoEntryValue()).public void putAll(TByteShortMap m)
TByteShortMapputAll in interface TByteShortMapm - 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.Short> map)
TByteShortMapputAll in interface TByteShortMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TByteShortMapclear in interface TByteShortMappublic TByteSet keySet()
TByteShortMapkeySet in interface TByteShortMappublic byte[] keys()
TByteShortMapkeys in interface TByteShortMappublic byte[] keys(byte[] array)
TByteShortMapkeys in interface TByteShortMaparray - 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 TShortCollection valueCollection()
TByteShortMapvalueCollection in interface TByteShortMappublic short[] values()
TByteShortMapvalues in interface TByteShortMappublic short[] values(short[] array)
TByteShortMapvalues in interface TByteShortMaparray - 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()
TByteShortMapTByteShortMap.get(byte) or TByteShortMap.put(byte, short) 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 TByteShortMappublic short getNoEntryValue()
TByteShortMapTByteShortMap.get(byte) or TByteShortMap.put(byte, short) 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 TByteShortMappublic boolean forEachKey(TByteProcedure procedure)
TByteShortMapforEachKey in interface TByteShortMapprocedure - a TByteProcedure valuepublic boolean forEachValue(TShortProcedure procedure)
TByteShortMapforEachValue in interface TByteShortMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TByteShortProcedure procedure)
TByteShortMapforEachEntry in interface TByteShortMapprocedure - a TOByteShortProcedure valuepublic TByteShortIterator iterator()
iterator in interface TByteShortMappublic short putIfAbsent(byte key,
short value)
TByteShortMapputIfAbsent in interface TByteShortMapTByteShortMap.getNoEntryValue()).public void transformValues(TShortFunction function)
TByteShortMaptransformValues in interface TByteShortMapfunction - a TShortFunction valuepublic boolean retainEntries(TByteShortProcedure procedure)
TByteShortMapretainEntries in interface TByteShortMapprocedure - determines which entries to keeppublic boolean increment(byte key)
TByteShortMapincrement in interface TByteShortMapkey - the key of the value to incrementpublic boolean adjustValue(byte key,
short amount)
TByteShortMapadjustValue in interface TByteShortMapkey - the key of the value to incrementamount - the amount to adjust the value by.public short adjustOrPutValue(byte key,
short adjust_amount,
short put_amount)
TByteShortMapadjustOrPutValue in interface TByteShortMapkey - 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