public class TSynchronizedShortDoubleMap extends java.lang.Object implements TShortDoubleMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedShortDoubleMap(TShortDoubleMap m) |
TSynchronizedShortDoubleMap(TShortDoubleMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
double |
adjustOrPutValue(short key,
double adjust_amount,
double put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(short key,
double 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(double value)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TShortDoubleProcedure 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(TDoubleProcedure procedure)
Executes procedure for each value in the map.
|
double |
get(short key)
Retrieves the value for key.
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortDoubleMap.get(short) or TShortDoubleMap.put(short, double) if no
entry exists for a given key. |
double |
getNoEntryValue()
Returns the value that will be returned from
TShortDoubleMap.get(short) or TShortDoubleMap.put(short, double) 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.
|
TShortDoubleIterator |
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
|
double |
put(short key,
double value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Double> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TShortDoubleMap map)
Put all the entries from the given map into this map.
|
double |
putIfAbsent(short key,
double value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
double |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortDoubleProcedure 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(TDoubleFunction function)
Transform the values in this map using function.
|
TDoubleCollection |
valueCollection()
Returns the values of the map as a TDoubleCollection
|
double[] |
values()
Returns the values of the map as an array of #e# values.
|
double[] |
values(double[] array)
Returns the values of the map using an existing array.
|
public TSynchronizedShortDoubleMap(TShortDoubleMap m)
public TSynchronizedShortDoubleMap(TShortDoubleMap m, java.lang.Object mutex)
public int size()
TShortDoubleMapsize in interface TShortDoubleMappublic boolean isEmpty()
TShortDoubleMapisEmpty in interface TShortDoubleMappublic boolean containsKey(short key)
TShortDoubleMapcontainsKey in interface TShortDoubleMappublic boolean containsValue(double value)
TShortDoubleMapcontainsValue in interface TShortDoubleMappublic double get(short key)
TShortDoubleMapget in interface TShortDoubleMapTShortDoubleMap.getNoEntryValue()).public double put(short key,
double value)
TShortDoubleMapput in interface TShortDoubleMapTShortDoubleMap.getNoEntryValue()).public double remove(short key)
TShortDoubleMapremove in interface TShortDoubleMapkey - an short valueTShortDoubleMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Double> map)
TShortDoubleMapputAll in interface TShortDoubleMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TShortDoubleMap map)
TShortDoubleMapputAll in interface TShortDoubleMapmap - The map from which entries will be obtained to put into this map.public void clear()
TShortDoubleMapclear in interface TShortDoubleMappublic TShortSet keySet()
TShortDoubleMapkeySet in interface TShortDoubleMappublic short[] keys()
TShortDoubleMapkeys in interface TShortDoubleMappublic short[] keys(short[] array)
TShortDoubleMapkeys in interface TShortDoubleMaparray - 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 TDoubleCollection valueCollection()
TShortDoubleMapvalueCollection in interface TShortDoubleMappublic double[] values()
TShortDoubleMapvalues in interface TShortDoubleMappublic double[] values(double[] array)
TShortDoubleMapvalues in interface TShortDoubleMaparray - 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 TShortDoubleIterator iterator()
iterator in interface TShortDoubleMappublic short getNoEntryKey()
TShortDoubleMapTShortDoubleMap.get(short) or TShortDoubleMap.put(short, double) 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 TShortDoubleMappublic double getNoEntryValue()
TShortDoubleMapTShortDoubleMap.get(short) or TShortDoubleMap.put(short, double) 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 TShortDoubleMappublic double putIfAbsent(short key,
double value)
TShortDoubleMapputIfAbsent in interface TShortDoubleMapTShortDoubleMap.getNoEntryValue()).public boolean forEachKey(TShortProcedure procedure)
TShortDoubleMapforEachKey in interface TShortDoubleMapprocedure - a TShortProcedure valuepublic boolean forEachValue(TDoubleProcedure procedure)
TShortDoubleMapforEachValue in interface TShortDoubleMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TShortDoubleProcedure procedure)
TShortDoubleMapforEachEntry in interface TShortDoubleMapprocedure - a TOShortDoubleProcedure valuepublic void transformValues(TDoubleFunction function)
TShortDoubleMaptransformValues in interface TShortDoubleMapfunction - a TDoubleFunction valuepublic boolean retainEntries(TShortDoubleProcedure procedure)
TShortDoubleMapretainEntries in interface TShortDoubleMapprocedure - determines which entries to keeppublic boolean increment(short key)
TShortDoubleMapincrement in interface TShortDoubleMapkey - the key of the value to incrementpublic boolean adjustValue(short key,
double amount)
TShortDoubleMapadjustValue in interface TShortDoubleMapkey - the key of the value to incrementamount - the amount to adjust the value by.public double adjustOrPutValue(short key,
double adjust_amount,
double put_amount)
TShortDoubleMapadjustOrPutValue in interface TShortDoubleMapkey - 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