public class TSynchronizedDoubleIntMap extends java.lang.Object implements TDoubleIntMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedDoubleIntMap(TDoubleIntMap m) |
TSynchronizedDoubleIntMap(TDoubleIntMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
int |
adjustOrPutValue(double 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(double key,
int amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(double 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(TDoubleIntProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TDoubleProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TIntProcedure procedure)
Executes procedure for each value in the map.
|
int |
get(double key)
Retrieves the value for key.
|
double |
getNoEntryKey()
Returns the value that will be returned from
TDoubleIntMap.get(double) or TDoubleIntMap.put(double, int) if no
entry exists for a given key. |
int |
getNoEntryValue()
Returns the value that will be returned from
TDoubleIntMap.get(double) or TDoubleIntMap.put(double, int) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(double key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TDoubleIntIterator |
iterator() |
double[] |
keys()
Returns the keys of the map as an array of double values.
|
double[] |
keys(double[] array)
Returns the keys of the map.
|
TDoubleSet |
keySet()
Returns the keys of the map as a TDoubleSet
|
int |
put(double key,
int value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TDoubleIntMap map)
Put all the entries from the given map into this map.
|
int |
putIfAbsent(double key,
int value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
int |
remove(double key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TDoubleIntProcedure 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 TSynchronizedDoubleIntMap(TDoubleIntMap m)
public TSynchronizedDoubleIntMap(TDoubleIntMap m, java.lang.Object mutex)
public int size()
TDoubleIntMapsize in interface TDoubleIntMappublic boolean isEmpty()
TDoubleIntMapisEmpty in interface TDoubleIntMappublic boolean containsKey(double key)
TDoubleIntMapcontainsKey in interface TDoubleIntMappublic boolean containsValue(int value)
TDoubleIntMapcontainsValue in interface TDoubleIntMappublic int get(double key)
TDoubleIntMapget in interface TDoubleIntMapTDoubleIntMap.getNoEntryValue()).public int put(double key,
int value)
TDoubleIntMapput in interface TDoubleIntMapTDoubleIntMap.getNoEntryValue()).public int remove(double key)
TDoubleIntMapremove in interface TDoubleIntMapkey - an double valueTDoubleIntMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> map)
TDoubleIntMapputAll in interface TDoubleIntMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TDoubleIntMap map)
TDoubleIntMapputAll in interface TDoubleIntMapmap - The map from which entries will be obtained to put into this map.public void clear()
TDoubleIntMapclear in interface TDoubleIntMappublic TDoubleSet keySet()
TDoubleIntMapkeySet in interface TDoubleIntMappublic double[] keys()
TDoubleIntMapkeys in interface TDoubleIntMappublic double[] keys(double[] array)
TDoubleIntMapkeys in interface TDoubleIntMaparray - 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()
TDoubleIntMapvalueCollection in interface TDoubleIntMappublic int[] values()
TDoubleIntMapvalues in interface TDoubleIntMappublic int[] values(int[] array)
TDoubleIntMapvalues in interface TDoubleIntMaparray - 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 TDoubleIntIterator iterator()
iterator in interface TDoubleIntMappublic double getNoEntryKey()
TDoubleIntMapTDoubleIntMap.get(double) or TDoubleIntMap.put(double, 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 TDoubleIntMappublic int getNoEntryValue()
TDoubleIntMapTDoubleIntMap.get(double) or TDoubleIntMap.put(double, 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 TDoubleIntMappublic int putIfAbsent(double key,
int value)
TDoubleIntMapputIfAbsent in interface TDoubleIntMapTDoubleIntMap.getNoEntryValue()).public boolean forEachKey(TDoubleProcedure procedure)
TDoubleIntMapforEachKey in interface TDoubleIntMapprocedure - a TDoubleProcedure valuepublic boolean forEachValue(TIntProcedure procedure)
TDoubleIntMapforEachValue in interface TDoubleIntMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TDoubleIntProcedure procedure)
TDoubleIntMapforEachEntry in interface TDoubleIntMapprocedure - a TODoubleIntProcedure valuepublic void transformValues(TIntFunction function)
TDoubleIntMaptransformValues in interface TDoubleIntMapfunction - a TIntFunction valuepublic boolean retainEntries(TDoubleIntProcedure procedure)
TDoubleIntMapretainEntries in interface TDoubleIntMapprocedure - determines which entries to keeppublic boolean increment(double key)
TDoubleIntMapincrement in interface TDoubleIntMapkey - the key of the value to incrementpublic boolean adjustValue(double key,
int amount)
TDoubleIntMapadjustValue in interface TDoubleIntMapkey - the key of the value to incrementamount - the amount to adjust the value by.public int adjustOrPutValue(double key,
int adjust_amount,
int put_amount)
TDoubleIntMapadjustOrPutValue in interface TDoubleIntMapkey - 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