public class TSynchronizedShortLongMap extends Objectimplements TShortLongMap , Serializable
| Constructor and Description |
|---|
TSynchronizedShortLongMap(TShortLongMap
|
TSynchronizedShortLongMap(TShortLongMap
|
| Modifier and Type | Method and Description |
|---|---|
long |
adjustOrPutValue(short 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(short key, long amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(short 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(TShortLongProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TShortProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TLongProcedure
Executes
procedure for each value in the map.
|
long |
get(short key)
Retrieves the value for
key
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortLongMap or
TShortLongMap if no entry exists for a given key.
|
long |
getNoEntryValue()
Returns the value that will be returned from
TShortLongMap or
TShortLongMap if no entry exists for a given key.
|
int |
hashCode()
|
boolean |
increment(short key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings.
|
TShortLongIterator |
iterator()
|
short[] |
keys()
Returns the keys of the map as an array of
short values.
|
short[] |
keys(short[] array)
Returns the keys of the map.
|
TShortSet |
keySet()
Returns the keys of the map as a
TShortSet
|
long |
put(short 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(TShortLongMap
Put all the entries from the given map into this map.
|
long |
putIfAbsent(short key, long value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
long |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortLongProcedure
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 TSynchronizedShortLongMap(TShortLongMapm)
public TSynchronizedShortLongMap(TShortLongMapm, Object mutex)
public int size()
TShortLongMap
size in interface
TShortLongMap
public boolean isEmpty()
TShortLongMap
isEmpty in interface
TShortLongMap
public boolean containsKey(short key)
TShortLongMap
containsKey in interface
TShortLongMap
key - an
short value
boolean value
public boolean containsValue(long value)
TShortLongMap
containsValue in interface
TShortLongMap
value - an
long value
boolean value
public long get(short key)
TShortLongMap
get in interface
TShortLongMap
key - an
short value
TShortLongMap.getNoEntryValue() ).
public long put(short key,
long value)
TShortLongMap
put in interface
TShortLongMap
key - an
short value
value - an
long value
TShortLongMap.getNoEntryValue() ).
public long remove(short key)
TShortLongMap
remove in interface
TShortLongMap
key - an
short value
TShortLongMap.getNoEntryValue() ).
public void putAll(Map<? extends Short ,? extends Long > map)
TShortLongMap
putAll in interface
TShortLongMap
map - The Map from which entries will be obtained to put into this map.
public void putAll(TShortLongMapmap)
TShortLongMap
putAll in interface
TShortLongMap
map - The map from which entries will be obtained to put into this map.
public void clear()
TShortLongMap
public TShortSetkeySet()
TShortLongMap
keySet in interface
TShortLongMap
public short[] keys()
TShortLongMap
keys in interface
TShortLongMap
public short[] keys(short[] array)
TShortLongMap
keys in interface
TShortLongMap
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()
TShortLongMap
valueCollection in interface
TShortLongMap
public long[] values()
TShortLongMap
values in interface
TShortLongMap
public long[] values(long[] array)
TShortLongMap
values in interface
TShortLongMap
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 TShortLongIteratoriterator()
iterator in interface
TShortLongMap
public short getNoEntryKey()
TShortLongMap
TShortLongMap.get(short) or
TShortLongMap.put(short, 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
TShortLongMap
public long getNoEntryValue()
TShortLongMap
TShortLongMap.get(short) or
TShortLongMap.put(short, 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
TShortLongMap
public long putIfAbsent(short key,
long value)
TShortLongMap
putIfAbsent in interface
TShortLongMap
key - an
short value
value - an
long value
TShortLongMap.getNoEntryValue() ).
public boolean forEachKey(TShortProcedureprocedure)
TShortLongMap
forEachKey in interface
TShortLongMap
procedure - a
TShortProcedure value
public boolean forEachValue(TLongProcedureprocedure)
TShortLongMap
forEachValue in interface
TShortLongMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TShortLongProcedureprocedure)
TShortLongMap
forEachEntry in interface
TShortLongMap
procedure - a
TOShortLongProcedure value
public void transformValues(TLongFunctionfunction)
TShortLongMap
transformValues in interface
TShortLongMap
function - a
TLongFunction value
public boolean retainEntries(TShortLongProcedureprocedure)
TShortLongMap
retainEntries in interface
TShortLongMap
procedure - determines which entries to keep
public boolean increment(short key)
TShortLongMap
increment in interface
TShortLongMap
key - the key of the value to increment
public boolean adjustValue(short key,
long amount)
TShortLongMap
adjustValue in interface
TShortLongMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public long adjustOrPutValue(short key,
long adjust_amount,
long put_amount)
TShortLongMap
adjustOrPutValue in interface
TShortLongMap
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()