public class TSynchronizedIntDoubleMap extends Objectimplements TIntDoubleMap , Serializable
| Constructor and Description |
|---|
TSynchronizedIntDoubleMap(TIntDoubleMap
|
TSynchronizedIntDoubleMap(TIntDoubleMap
|
| Modifier and Type | Method and Description |
|---|---|
double |
adjustOrPutValue(int 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(int key, double amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(int 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(Object
|
boolean |
forEachEntry(TIntDoubleProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TIntProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TDoubleProcedure
Executes
procedure for each value in the map.
|
double |
get(int key)
Retrieves the value for
key
|
int |
getNoEntryKey()
Returns the value that will be returned from
TIntDoubleMap or
TIntDoubleMap if no entry exists for a given key.
|
double |
getNoEntryValue()
Returns the value that will be returned from
TIntDoubleMap or
TIntDoubleMap if no entry exists for a given key.
|
int |
hashCode()
|
boolean |
increment(int key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings.
|
TIntDoubleIterator |
iterator()
|
int[] |
keys()
Returns the keys of the map as an array of
int values.
|
int[] |
keys(int[] array)
Returns the keys of the map.
|
TIntSet |
keySet()
Returns the keys of the map as a
TIntSet
|
double |
put(int key, double value)
Inserts a key/value pair into the map.
|
void |
putAll(Map
Put all the entries from the given Map into this map.
|
void |
putAll(TIntDoubleMap
Put all the entries from the given map into this map.
|
double |
putIfAbsent(int key, double value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
double |
remove(int key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TIntDoubleProcedure
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.
|
String |
toString()
|
void |
transformValues(TDoubleFunction
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 TSynchronizedIntDoubleMap(TIntDoubleMapm)
public TSynchronizedIntDoubleMap(TIntDoubleMapm, Object mutex)
public int size()
TIntDoubleMap
size in interface
TIntDoubleMap
public boolean isEmpty()
TIntDoubleMap
isEmpty in interface
TIntDoubleMap
public boolean containsKey(int key)
TIntDoubleMap
containsKey in interface
TIntDoubleMap
key - an
int value
boolean value
public boolean containsValue(double value)
TIntDoubleMap
containsValue in interface
TIntDoubleMap
value - an
double value
boolean value
public double get(int key)
TIntDoubleMap
get in interface
TIntDoubleMap
key - an
int value
TIntDoubleMap.getNoEntryValue() ).
public double put(int key,
double value)
TIntDoubleMap
put in interface
TIntDoubleMap
key - an
int value
value - an
double value
TIntDoubleMap.getNoEntryValue() ).
public double remove(int key)
TIntDoubleMap
remove in interface
TIntDoubleMap
key - an
int value
TIntDoubleMap.getNoEntryValue() ).
public void putAll(Map<? extends Integer ,? extends Double > map)
TIntDoubleMap
putAll in interface
TIntDoubleMap
map - The Map from which entries will be obtained to put into this map.
public void putAll(TIntDoubleMapmap)
TIntDoubleMap
putAll in interface
TIntDoubleMap
map - The map from which entries will be obtained to put into this map.
public void clear()
TIntDoubleMap
public TIntSetkeySet()
TIntDoubleMap
keySet in interface
TIntDoubleMap
public int[] keys()
TIntDoubleMap
keys in interface
TIntDoubleMap
public int[] keys(int[] array)
TIntDoubleMap
keys in interface
TIntDoubleMap
array - 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 TDoubleCollectionvalueCollection()
TIntDoubleMap
valueCollection in interface
TIntDoubleMap
public double[] values()
TIntDoubleMap
values in interface
TIntDoubleMap
public double[] values(double[] array)
TIntDoubleMap
values in interface
TIntDoubleMap
array - 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 TIntDoubleIteratoriterator()
iterator in interface
TIntDoubleMap
public int getNoEntryKey()
TIntDoubleMap
TIntDoubleMap.get(int) or
TIntDoubleMap.put(int, double) if no entry exists for a given key. The default value is generally zero, but can be changed during construction of the collection.
getNoEntryKey in interface
TIntDoubleMap
public double getNoEntryValue()
TIntDoubleMap
TIntDoubleMap.get(int) or
TIntDoubleMap.put(int, double) if no entry exists for a given key. The default value is generally zero, but can be changed during construction of the collection.
getNoEntryValue in interface
TIntDoubleMap
public double putIfAbsent(int key,
double value)
TIntDoubleMap
putIfAbsent in interface
TIntDoubleMap
key - an
int value
value - an
double value
TIntDoubleMap.getNoEntryValue() ).
public boolean forEachKey(TIntProcedureprocedure)
TIntDoubleMap
forEachKey in interface
TIntDoubleMap
procedure - a
TIntProcedure value
public boolean forEachValue(TDoubleProcedureprocedure)
TIntDoubleMap
forEachValue in interface
TIntDoubleMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TIntDoubleProcedureprocedure)
TIntDoubleMap
forEachEntry in interface
TIntDoubleMap
procedure - a
TOIntDoubleProcedure value
public void transformValues(TDoubleFunctionfunction)
TIntDoubleMap
transformValues in interface
TIntDoubleMap
function - a
TDoubleFunction value
public boolean retainEntries(TIntDoubleProcedureprocedure)
TIntDoubleMap
retainEntries in interface
TIntDoubleMap
procedure - determines which entries to keep
public boolean increment(int key)
TIntDoubleMap
increment in interface
TIntDoubleMap
key - the key of the value to increment
public boolean adjustValue(int key,
double amount)
TIntDoubleMap
adjustValue in interface
TIntDoubleMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public double adjustOrPutValue(int key,
double adjust_amount,
double put_amount)
TIntDoubleMap
adjustOrPutValue in interface
TIntDoubleMap
key - the key of the value to increment
adjust_amount - the amount to adjust the value by
put_amount - the value put into the map if the key is not initial present
public boolean equals(Objecto)
public int hashCode()
public StringtoString()