public class TSynchronizedIntLongMap extends Objectimplements TIntLongMap , Serializable
| Constructor and Description |
|---|
TSynchronizedIntLongMap(TIntLongMap
|
TSynchronizedIntLongMap(TIntLongMap
|
| Modifier and Type | Method and Description |
|---|---|
long |
adjustOrPutValue(int 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(int key, long 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(long value)
Checks for the presence of
val in the values of the map.
|
boolean |
equals(Object
|
boolean |
forEachEntry(TIntLongProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TIntProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TLongProcedure
Executes
procedure for each value in the map.
|
long |
get(int key)
Retrieves the value for
key
|
int |
getNoEntryKey()
Returns the value that will be returned from
TIntLongMap or
TIntLongMap if no entry exists for a given key.
|
long |
getNoEntryValue()
Returns the value that will be returned from
TIntLongMap or
TIntLongMap 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.
|
TIntLongIterator |
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
|
long |
put(int key, long 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(TIntLongMap
Put all the entries from the given map into this map.
|
long |
putIfAbsent(int key, long value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
long |
remove(int key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TIntLongProcedure
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(TLongFunction
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 TSynchronizedIntLongMap(TIntLongMapm)
public TSynchronizedIntLongMap(TIntLongMapm, Object mutex)
public int size()
TIntLongMap
size in interface
TIntLongMap
public boolean isEmpty()
TIntLongMap
isEmpty in interface
TIntLongMap
public boolean containsKey(int key)
TIntLongMap
containsKey in interface
TIntLongMap
key - an
int value
boolean value
public boolean containsValue(long value)
TIntLongMap
containsValue in interface
TIntLongMap
value - an
long value
boolean value
public long get(int key)
TIntLongMap
get in interface
TIntLongMap
key - an
int value
TIntLongMap.getNoEntryValue() ).
public long put(int key,
long value)
TIntLongMap
put in interface
TIntLongMap
key - an
int value
value - an
long value
TIntLongMap.getNoEntryValue() ).
public long remove(int key)
TIntLongMap
remove in interface
TIntLongMap
key - an
int value
TIntLongMap.getNoEntryValue() ).
public void putAll(Map<? extends Integer ,? extends Long > map)
TIntLongMap
putAll in interface
TIntLongMap
map - The Map from which entries will be obtained to put into this map.
public void putAll(TIntLongMapmap)
TIntLongMap
putAll in interface
TIntLongMap
map - The map from which entries will be obtained to put into this map.
public void clear()
TIntLongMap
public TIntSetkeySet()
TIntLongMap
keySet in interface
TIntLongMap
public int[] keys()
TIntLongMap
keys in interface
TIntLongMap
public int[] keys(int[] array)
TIntLongMap
keys in interface
TIntLongMap
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 TLongCollectionvalueCollection()
TIntLongMap
valueCollection in interface
TIntLongMap
public long[] values()
TIntLongMap
values in interface
TIntLongMap
public long[] values(long[] array)
TIntLongMap
values in interface
TIntLongMap
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 TIntLongIteratoriterator()
iterator in interface
TIntLongMap
public int getNoEntryKey()
TIntLongMap
TIntLongMap.get(int) or
TIntLongMap.put(int, long) 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
TIntLongMap
public long getNoEntryValue()
TIntLongMap
TIntLongMap.get(int) or
TIntLongMap.put(int, long) 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
TIntLongMap
public long putIfAbsent(int key,
long value)
TIntLongMap
putIfAbsent in interface
TIntLongMap
key - an
int value
value - an
long value
TIntLongMap.getNoEntryValue() ).
public boolean forEachKey(TIntProcedureprocedure)
TIntLongMap
forEachKey in interface
TIntLongMap
procedure - a
TIntProcedure value
public boolean forEachValue(TLongProcedureprocedure)
TIntLongMap
forEachValue in interface
TIntLongMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TIntLongProcedureprocedure)
TIntLongMap
forEachEntry in interface
TIntLongMap
procedure - a
TOIntLongProcedure value
public void transformValues(TLongFunctionfunction)
TIntLongMap
transformValues in interface
TIntLongMap
function - a
TLongFunction value
public boolean retainEntries(TIntLongProcedureprocedure)
TIntLongMap
retainEntries in interface
TIntLongMap
procedure - determines which entries to keep
public boolean increment(int key)
TIntLongMap
increment in interface
TIntLongMap
key - the key of the value to increment
public boolean adjustValue(int key,
long amount)
TIntLongMap
adjustValue in interface
TIntLongMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public long adjustOrPutValue(int key,
long adjust_amount,
long put_amount)
TIntLongMap
adjustOrPutValue in interface
TIntLongMap
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()