public class TSynchronizedLongLongMap extends java.lang.Object implements TLongLongMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedLongLongMap(TLongLongMap m) |
TSynchronizedLongLongMap(TLongLongMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
long |
adjustOrPutValue(long 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(long key,
long amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(long 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(TLongLongProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TLongProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TLongProcedure procedure)
Executes procedure for each value in the map.
|
long |
get(long key)
Retrieves the value for key.
|
long |
getNoEntryKey()
Returns the value that will be returned from
TLongLongMap.get(long) or TLongLongMap.put(long, long) if no
entry exists for a given key. |
long |
getNoEntryValue()
Returns the value that will be returned from
TLongLongMap.get(long) or TLongLongMap.put(long, long) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(long key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TLongLongIterator |
iterator() |
long[] |
keys()
Returns the keys of the map as an array of long values.
|
long[] |
keys(long[] array)
Returns the keys of the map.
|
TLongSet |
keySet()
Returns the keys of the map as a TLongSet
|
long |
put(long key,
long value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TLongLongMap map)
Put all the entries from the given map into this map.
|
long |
putIfAbsent(long key,
long value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
long |
remove(long key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TLongLongProcedure 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 TSynchronizedLongLongMap(TLongLongMap m)
public TSynchronizedLongLongMap(TLongLongMap m, java.lang.Object mutex)
public int size()
TLongLongMapsize in interface TLongLongMappublic boolean isEmpty()
TLongLongMapisEmpty in interface TLongLongMappublic boolean containsKey(long key)
TLongLongMapcontainsKey in interface TLongLongMappublic boolean containsValue(long value)
TLongLongMapcontainsValue in interface TLongLongMappublic long get(long key)
TLongLongMapget in interface TLongLongMapTLongLongMap.getNoEntryValue()).public long put(long key,
long value)
TLongLongMapput in interface TLongLongMapTLongLongMap.getNoEntryValue()).public long remove(long key)
TLongLongMapremove in interface TLongLongMapkey - an long valueTLongLongMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> map)
TLongLongMapputAll in interface TLongLongMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TLongLongMap map)
TLongLongMapputAll in interface TLongLongMapmap - The map from which entries will be obtained to put into this map.public void clear()
TLongLongMapclear in interface TLongLongMappublic TLongSet keySet()
TLongLongMapkeySet in interface TLongLongMappublic long[] keys()
TLongLongMapkeys in interface TLongLongMappublic long[] keys(long[] array)
TLongLongMapkeys in interface TLongLongMaparray - 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()
TLongLongMapvalueCollection in interface TLongLongMappublic long[] values()
TLongLongMapvalues in interface TLongLongMappublic long[] values(long[] array)
TLongLongMapvalues in interface TLongLongMaparray - 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 TLongLongIterator iterator()
iterator in interface TLongLongMappublic long getNoEntryKey()
TLongLongMapTLongLongMap.get(long) or TLongLongMap.put(long, 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 TLongLongMappublic long getNoEntryValue()
TLongLongMapTLongLongMap.get(long) or TLongLongMap.put(long, 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 TLongLongMappublic long putIfAbsent(long key,
long value)
TLongLongMapputIfAbsent in interface TLongLongMapTLongLongMap.getNoEntryValue()).public boolean forEachKey(TLongProcedure procedure)
TLongLongMapforEachKey in interface TLongLongMapprocedure - a TLongProcedure valuepublic boolean forEachValue(TLongProcedure procedure)
TLongLongMapforEachValue in interface TLongLongMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TLongLongProcedure procedure)
TLongLongMapforEachEntry in interface TLongLongMapprocedure - a TOLongLongProcedure valuepublic void transformValues(TLongFunction function)
TLongLongMaptransformValues in interface TLongLongMapfunction - a TLongFunction valuepublic boolean retainEntries(TLongLongProcedure procedure)
TLongLongMapretainEntries in interface TLongLongMapprocedure - determines which entries to keeppublic boolean increment(long key)
TLongLongMapincrement in interface TLongLongMapkey - the key of the value to incrementpublic boolean adjustValue(long key,
long amount)
TLongLongMapadjustValue in interface TLongLongMapkey - the key of the value to incrementamount - the amount to adjust the value by.public long adjustOrPutValue(long key,
long adjust_amount,
long put_amount)
TLongLongMapadjustOrPutValue in interface TLongLongMapkey - 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