public class TSynchronizedCharLongMap extends java.lang.Object implements TCharLongMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedCharLongMap(TCharLongMap m) |
TSynchronizedCharLongMap(TCharLongMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
long |
adjustOrPutValue(char key,
long adjust_amount,
long put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(char key,
long amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(char key)
Checks for the present of key in the keys of the map.
|
boolean |
containsValue(long value)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TCharLongProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TCharProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TLongProcedure procedure)
Executes procedure for each value in the map.
|
long |
get(char key)
Retrieves the value for key.
|
char |
getNoEntryKey()
Returns the value that will be returned from
TCharLongMap.get(char) or TCharLongMap.put(char, long) if no
entry exists for a given key. |
long |
getNoEntryValue()
Returns the value that will be returned from
TCharLongMap.get(char) or TCharLongMap.put(char, long) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(char key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TCharLongIterator |
iterator() |
char[] |
keys()
Returns the keys of the map as an array of char values.
|
char[] |
keys(char[] array)
Returns the keys of the map.
|
TCharSet |
keySet()
Returns the keys of the map as a TCharSet
|
long |
put(char key,
long value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TCharLongMap map)
Put all the entries from the given map into this map.
|
long |
putIfAbsent(char key,
long value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
long |
remove(char key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TCharLongProcedure 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(TLongFunction function)
Transform the values in this map using function.
|
TLongCollection |
valueCollection()
Returns the values of the map as a TLongCollection
|
long[] |
values()
Returns the values of the map as an array of #e# values.
|
long[] |
values(long[] array)
Returns the values of the map using an existing array.
|
public TSynchronizedCharLongMap(TCharLongMap m)
public TSynchronizedCharLongMap(TCharLongMap m, java.lang.Object mutex)
public int size()
TCharLongMapsize in interface TCharLongMappublic boolean isEmpty()
TCharLongMapisEmpty in interface TCharLongMappublic boolean containsKey(char key)
TCharLongMapcontainsKey in interface TCharLongMappublic boolean containsValue(long value)
TCharLongMapcontainsValue in interface TCharLongMappublic long get(char key)
TCharLongMapget in interface TCharLongMapTCharLongMap.getNoEntryValue()).public long put(char key,
long value)
TCharLongMapput in interface TCharLongMapTCharLongMap.getNoEntryValue()).public long remove(char key)
TCharLongMapremove in interface TCharLongMapkey - an char valueTCharLongMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map)
TCharLongMapputAll in interface TCharLongMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TCharLongMap map)
TCharLongMapputAll in interface TCharLongMapmap - The map from which entries will be obtained to put into this map.public void clear()
TCharLongMapclear in interface TCharLongMappublic TCharSet keySet()
TCharLongMapkeySet in interface TCharLongMappublic char[] keys()
TCharLongMapkeys in interface TCharLongMappublic char[] keys(char[] array)
TCharLongMapkeys in interface TCharLongMaparray - 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 TLongCollection valueCollection()
TCharLongMapvalueCollection in interface TCharLongMappublic long[] values()
TCharLongMapvalues in interface TCharLongMappublic long[] values(long[] array)
TCharLongMapvalues in interface TCharLongMaparray - 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 TCharLongIterator iterator()
iterator in interface TCharLongMappublic char getNoEntryKey()
TCharLongMapTCharLongMap.get(char) or TCharLongMap.put(char, long) 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 TCharLongMappublic long getNoEntryValue()
TCharLongMapTCharLongMap.get(char) or TCharLongMap.put(char, long) 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 TCharLongMappublic long putIfAbsent(char key,
long value)
TCharLongMapputIfAbsent in interface TCharLongMapTCharLongMap.getNoEntryValue()).public boolean forEachKey(TCharProcedure procedure)
TCharLongMapforEachKey in interface TCharLongMapprocedure - a TCharProcedure valuepublic boolean forEachValue(TLongProcedure procedure)
TCharLongMapforEachValue in interface TCharLongMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TCharLongProcedure procedure)
TCharLongMapforEachEntry in interface TCharLongMapprocedure - a TOCharLongProcedure valuepublic void transformValues(TLongFunction function)
TCharLongMaptransformValues in interface TCharLongMapfunction - a TLongFunction valuepublic boolean retainEntries(TCharLongProcedure procedure)
TCharLongMapretainEntries in interface TCharLongMapprocedure - determines which entries to keeppublic boolean increment(char key)
TCharLongMapincrement in interface TCharLongMapkey - the key of the value to incrementpublic boolean adjustValue(char key,
long amount)
TCharLongMapadjustValue in interface TCharLongMapkey - the key of the value to incrementamount - the amount to adjust the value by.public long adjustOrPutValue(char key,
long adjust_amount,
long put_amount)
TCharLongMapadjustOrPutValue in interface TCharLongMapkey - 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