public class TSynchronizedShortIntMap extends Objectimplements TShortIntMap , Serializable
| Constructor and Description |
|---|
TSynchronizedShortIntMap(TShortIntMap
|
TSynchronizedShortIntMap(TShortIntMap
|
| Modifier and Type | Method and Description |
|---|---|
int |
adjustOrPutValue(short key, int adjust_amount, int put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(short key, int 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(int value)
Checks for the presence of
val in the values of the map.
|
boolean |
equals(Object
|
boolean |
forEachEntry(TShortIntProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TShortProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TIntProcedure
Executes
procedure for each value in the map.
|
int |
get(short key)
Retrieves the value for
key
|
short |
getNoEntryKey()
Returns the value that will be returned from
TShortIntMap or
TShortIntMap if no entry exists for a given key.
|
int |
getNoEntryValue()
Returns the value that will be returned from
TShortIntMap or
TShortIntMap 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.
|
TShortIntIterator |
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
|
int |
put(short key, int 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(TShortIntMap
Put all the entries from the given map into this map.
|
int |
putIfAbsent(short key, int value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
int |
remove(short key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TShortIntProcedure
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(TIntFunction
Transform the values in this map using
function.
|
TIntCollection |
valueCollection()
Returns the values of the map as a
TIntCollection
|
int[] |
values()
Returns the values of the map as an array of
#e# values.
|
int[] |
values(int[] array)
Returns the values of the map using an existing array.
|
public TSynchronizedShortIntMap(TShortIntMapm)
public TSynchronizedShortIntMap(TShortIntMapm, Object mutex)
public int size()
TShortIntMap
size in interface
TShortIntMap
public boolean isEmpty()
TShortIntMap
isEmpty in interface
TShortIntMap
public boolean containsKey(short key)
TShortIntMap
containsKey in interface
TShortIntMap
key - an
short value
boolean value
public boolean containsValue(int value)
TShortIntMap
containsValue in interface
TShortIntMap
value - an
int value
boolean value
public int get(short key)
TShortIntMap
get in interface
TShortIntMap
key - an
short value
TShortIntMap.getNoEntryValue() ).
public int put(short key,
int value)
TShortIntMap
put in interface
TShortIntMap
key - an
short value
value - an
int value
TShortIntMap.getNoEntryValue() ).
public int remove(short key)
TShortIntMap
remove in interface
TShortIntMap
key - an
short value
TShortIntMap.getNoEntryValue() ).
public void putAll(Map<? extends Short ,? extends Integer > map)
TShortIntMap
putAll in interface
TShortIntMap
map - The Map from which entries will be obtained to put into this map.
public void putAll(TShortIntMapmap)
TShortIntMap
putAll in interface
TShortIntMap
map - The map from which entries will be obtained to put into this map.
public void clear()
TShortIntMap
public TShortSetkeySet()
TShortIntMap
keySet in interface
TShortIntMap
public short[] keys()
TShortIntMap
keys in interface
TShortIntMap
public short[] keys(short[] array)
TShortIntMap
keys in interface
TShortIntMap
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 TIntCollectionvalueCollection()
TShortIntMap
valueCollection in interface
TShortIntMap
public int[] values()
TShortIntMap
values in interface
TShortIntMap
public int[] values(int[] array)
TShortIntMap
values in interface
TShortIntMap
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 TShortIntIteratoriterator()
iterator in interface
TShortIntMap
public short getNoEntryKey()
TShortIntMap
TShortIntMap.get(short) or
TShortIntMap.put(short, int) 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
TShortIntMap
public int getNoEntryValue()
TShortIntMap
TShortIntMap.get(short) or
TShortIntMap.put(short, int) 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
TShortIntMap
public int putIfAbsent(short key,
int value)
TShortIntMap
putIfAbsent in interface
TShortIntMap
key - an
short value
value - an
int value
TShortIntMap.getNoEntryValue() ).
public boolean forEachKey(TShortProcedureprocedure)
TShortIntMap
forEachKey in interface
TShortIntMap
procedure - a
TShortProcedure value
public boolean forEachValue(TIntProcedureprocedure)
TShortIntMap
forEachValue in interface
TShortIntMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TShortIntProcedureprocedure)
TShortIntMap
forEachEntry in interface
TShortIntMap
procedure - a
TOShortIntProcedure value
public void transformValues(TIntFunctionfunction)
TShortIntMap
transformValues in interface
TShortIntMap
function - a
TIntFunction value
public boolean retainEntries(TShortIntProcedureprocedure)
TShortIntMap
retainEntries in interface
TShortIntMap
procedure - determines which entries to keep
public boolean increment(short key)
TShortIntMap
increment in interface
TShortIntMap
key - the key of the value to increment
public boolean adjustValue(short key,
int amount)
TShortIntMap
adjustValue in interface
TShortIntMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public int adjustOrPutValue(short key,
int adjust_amount,
int put_amount)
TShortIntMap
adjustOrPutValue in interface
TShortIntMap
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()