public class TUnmodifiableShortShortMap extends java.lang.Object implements TShortShortMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableShortShortMap(TShortShortMap m) |
| Modifier and Type | Method and Description |
|---|---|
short |
adjustOrPutValue(short 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(short key,
short 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(short val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TShortShortProcedure 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(TShortProcedure procedure)
Executes procedure for each value in the map.
|
short |
get(short key)
Retrieves the value for key.
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortShortMap.get(short) or TShortShortMap.put(short, short) if no
entry exists for a given key. |
short |
getNoEntryValue()
Returns the value that will be returned from
TShortShortMap.get(short) or TShortShortMap.put(short, short) 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.
|
TShortShortIterator |
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
|
short |
put(short key,
short value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Short> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TShortShortMap m)
Put all the entries from the given map into this map.
|
short |
putIfAbsent(short key,
short value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
short |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortShortProcedure 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 TUnmodifiableShortShortMap(TShortShortMap m)
public int size()
TShortShortMapsize in interface TShortShortMappublic boolean isEmpty()
TShortShortMapisEmpty in interface TShortShortMappublic boolean containsKey(short key)
TShortShortMapcontainsKey in interface TShortShortMappublic boolean containsValue(short val)
TShortShortMapcontainsValue in interface TShortShortMappublic short get(short key)
TShortShortMapget in interface TShortShortMapTShortShortMap.getNoEntryValue()).public short put(short key,
short value)
TShortShortMapput in interface TShortShortMapTShortShortMap.getNoEntryValue()).public short remove(short key)
TShortShortMapremove in interface TShortShortMapkey - an short valueTShortShortMap.getNoEntryValue()).public void putAll(TShortShortMap m)
TShortShortMapputAll in interface TShortShortMapm - 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.Short> map)
TShortShortMapputAll in interface TShortShortMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TShortShortMapclear in interface TShortShortMappublic TShortSet keySet()
TShortShortMapkeySet in interface TShortShortMappublic short[] keys()
TShortShortMapkeys in interface TShortShortMappublic short[] keys(short[] array)
TShortShortMapkeys in interface TShortShortMaparray - 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()
TShortShortMapvalueCollection in interface TShortShortMappublic short[] values()
TShortShortMapvalues in interface TShortShortMappublic short[] values(short[] array)
TShortShortMapvalues in interface TShortShortMaparray - 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()
TShortShortMapTShortShortMap.get(short) or TShortShortMap.put(short, 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 TShortShortMappublic short getNoEntryValue()
TShortShortMapTShortShortMap.get(short) or TShortShortMap.put(short, 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 TShortShortMappublic boolean forEachKey(TShortProcedure procedure)
TShortShortMapforEachKey in interface TShortShortMapprocedure - a TShortProcedure valuepublic boolean forEachValue(TShortProcedure procedure)
TShortShortMapforEachValue in interface TShortShortMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TShortShortProcedure procedure)
TShortShortMapforEachEntry in interface TShortShortMapprocedure - a TOShortShortProcedure valuepublic TShortShortIterator iterator()
iterator in interface TShortShortMappublic short putIfAbsent(short key,
short value)
TShortShortMapputIfAbsent in interface TShortShortMapTShortShortMap.getNoEntryValue()).public void transformValues(TShortFunction function)
TShortShortMaptransformValues in interface TShortShortMapfunction - a TShortFunction valuepublic boolean retainEntries(TShortShortProcedure procedure)
TShortShortMapretainEntries in interface TShortShortMapprocedure - determines which entries to keeppublic boolean increment(short key)
TShortShortMapincrement in interface TShortShortMapkey - the key of the value to incrementpublic boolean adjustValue(short key,
short amount)
TShortShortMapadjustValue in interface TShortShortMapkey - the key of the value to incrementamount - the amount to adjust the value by.public short adjustOrPutValue(short key,
short adjust_amount,
short put_amount)
TShortShortMapadjustOrPutValue in interface TShortShortMapkey - 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