public class TSynchronizedShortIntMap extends java.lang.Object implements TShortIntMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedShortIntMap(TShortIntMap m) |
TSynchronizedShortIntMap(TShortIntMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
int |
adjustOrPutValue(short key,
int adjust_amount,
int put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(short key,
int 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(int value)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TShortIntProcedure 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(TIntProcedure procedure)
Executes procedure for each value in the map.
|
int |
get(short key)
Retrieves the value for key.
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortIntMap.get(short) or TShortIntMap.put(short, int) if no
entry exists for a given key. |
int |
getNoEntryValue()
Returns the value that will be returned from
TShortIntMap.get(short) or TShortIntMap.put(short, int) 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.
|
TShortIntIterator |
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
|
int |
put(short key,
int value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Integer> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TShortIntMap map)
Put all the entries from the given map into this map.
|
int |
putIfAbsent(short key,
int value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
int |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortIntProcedure 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(TIntFunction function)
Transform the values in this map using function.
|
TIntCollection |
valueCollection()
Returns the values of the map as a TIntCollection
|
int[] |
values()
Returns the values of the map as an array of #e# values.
|
int[] |
values(int[] array)
Returns the values of the map using an existing array.
|
public TSynchronizedShortIntMap(TShortIntMap m)
public TSynchronizedShortIntMap(TShortIntMap m, java.lang.Object mutex)
public int size()
TShortIntMapsize in interface TShortIntMappublic boolean isEmpty()
TShortIntMapisEmpty in interface TShortIntMappublic boolean containsKey(short key)
TShortIntMapcontainsKey in interface TShortIntMappublic boolean containsValue(int value)
TShortIntMapcontainsValue in interface TShortIntMappublic int get(short key)
TShortIntMapget in interface TShortIntMapTShortIntMap.getNoEntryValue()).public int put(short key,
int value)
TShortIntMapput in interface TShortIntMapTShortIntMap.getNoEntryValue()).public int remove(short key)
TShortIntMapremove in interface TShortIntMapkey - an short valueTShortIntMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Integer> map)
TShortIntMapputAll in interface TShortIntMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TShortIntMap map)
TShortIntMapputAll in interface TShortIntMapmap - The map from which entries will be obtained to put into this map.public void clear()
TShortIntMapclear in interface TShortIntMappublic TShortSet keySet()
TShortIntMapkeySet in interface TShortIntMappublic short[] keys()
TShortIntMapkeys in interface TShortIntMappublic short[] keys(short[] array)
TShortIntMapkeys in interface TShortIntMaparray - 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 TIntCollection valueCollection()
TShortIntMapvalueCollection in interface TShortIntMappublic int[] values()
TShortIntMapvalues in interface TShortIntMappublic int[] values(int[] array)
TShortIntMapvalues in interface TShortIntMaparray - 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 TShortIntIterator iterator()
iterator in interface TShortIntMappublic short getNoEntryKey()
TShortIntMapTShortIntMap.get(short) or TShortIntMap.put(short, int) 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 TShortIntMappublic int getNoEntryValue()
TShortIntMapTShortIntMap.get(short) or TShortIntMap.put(short, int) 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 TShortIntMappublic int putIfAbsent(short key,
int value)
TShortIntMapputIfAbsent in interface TShortIntMapTShortIntMap.getNoEntryValue()).public boolean forEachKey(TShortProcedure procedure)
TShortIntMapforEachKey in interface TShortIntMapprocedure - a TShortProcedure valuepublic boolean forEachValue(TIntProcedure procedure)
TShortIntMapforEachValue in interface TShortIntMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TShortIntProcedure procedure)
TShortIntMapforEachEntry in interface TShortIntMapprocedure - a TOShortIntProcedure valuepublic void transformValues(TIntFunction function)
TShortIntMaptransformValues in interface TShortIntMapfunction - a TIntFunction valuepublic boolean retainEntries(TShortIntProcedure procedure)
TShortIntMapretainEntries in interface TShortIntMapprocedure - determines which entries to keeppublic boolean increment(short key)
TShortIntMapincrement in interface TShortIntMapkey - the key of the value to incrementpublic boolean adjustValue(short key,
int amount)
TShortIntMapadjustValue in interface TShortIntMapkey - the key of the value to incrementamount - the amount to adjust the value by.public int adjustOrPutValue(short key,
int adjust_amount,
int put_amount)
TShortIntMapadjustOrPutValue in interface TShortIntMapkey - 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 presentpublic 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.Object