public class TSynchronizedIntByteMap extends java.lang.Object implements TIntByteMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedIntByteMap(TIntByteMap m) |
TSynchronizedIntByteMap(TIntByteMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(int key,
byte adjust_amount,
byte put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(int key,
byte 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(byte value)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TIntByteProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TIntProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TByteProcedure procedure)
Executes procedure for each value in the map.
|
byte |
get(int key)
Retrieves the value for key.
|
int |
getNoEntryKey()
Returns the value that will be returned from
TIntByteMap.get(int) or TIntByteMap.put(int, byte) if no
entry exists for a given key. |
byte |
getNoEntryValue()
Returns the value that will be returned from
TIntByteMap.get(int) or TIntByteMap.put(int, byte) 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.
|
TIntByteIterator |
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
|
byte |
put(int key,
byte value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Byte> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TIntByteMap map)
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(int key,
byte value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
byte |
remove(int key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TIntByteProcedure 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(TByteFunction function)
Transform the values in this map using function.
|
TByteCollection |
valueCollection()
Returns the values of the map as a TByteCollection
|
byte[] |
values()
Returns the values of the map as an array of #e# values.
|
byte[] |
values(byte[] array)
Returns the values of the map using an existing array.
|
public TSynchronizedIntByteMap(TIntByteMap m)
public TSynchronizedIntByteMap(TIntByteMap m, java.lang.Object mutex)
public int size()
TIntByteMapsize in interface TIntByteMappublic boolean isEmpty()
TIntByteMapisEmpty in interface TIntByteMappublic boolean containsKey(int key)
TIntByteMapcontainsKey in interface TIntByteMappublic boolean containsValue(byte value)
TIntByteMapcontainsValue in interface TIntByteMappublic byte get(int key)
TIntByteMapget in interface TIntByteMapTIntByteMap.getNoEntryValue()).public byte put(int key,
byte value)
TIntByteMapput in interface TIntByteMapTIntByteMap.getNoEntryValue()).public byte remove(int key)
TIntByteMapremove in interface TIntByteMapkey - an int valueTIntByteMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Byte> map)
TIntByteMapputAll in interface TIntByteMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TIntByteMap map)
TIntByteMapputAll in interface TIntByteMapmap - The map from which entries will be obtained to put into this map.public void clear()
TIntByteMapclear in interface TIntByteMappublic TIntSet keySet()
TIntByteMapkeySet in interface TIntByteMappublic int[] keys()
TIntByteMapkeys in interface TIntByteMappublic int[] keys(int[] array)
TIntByteMapkeys in interface TIntByteMaparray - 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 TByteCollection valueCollection()
TIntByteMapvalueCollection in interface TIntByteMappublic byte[] values()
TIntByteMapvalues in interface TIntByteMappublic byte[] values(byte[] array)
TIntByteMapvalues in interface TIntByteMaparray - 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 TIntByteIterator iterator()
iterator in interface TIntByteMappublic int getNoEntryKey()
TIntByteMapTIntByteMap.get(int) or TIntByteMap.put(int, byte) 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 TIntByteMappublic byte getNoEntryValue()
TIntByteMapTIntByteMap.get(int) or TIntByteMap.put(int, byte) 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 TIntByteMappublic byte putIfAbsent(int key,
byte value)
TIntByteMapputIfAbsent in interface TIntByteMapTIntByteMap.getNoEntryValue()).public boolean forEachKey(TIntProcedure procedure)
TIntByteMapforEachKey in interface TIntByteMapprocedure - a TIntProcedure valuepublic boolean forEachValue(TByteProcedure procedure)
TIntByteMapforEachValue in interface TIntByteMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TIntByteProcedure procedure)
TIntByteMapforEachEntry in interface TIntByteMapprocedure - a TOIntByteProcedure valuepublic void transformValues(TByteFunction function)
TIntByteMaptransformValues in interface TIntByteMapfunction - a TByteFunction valuepublic boolean retainEntries(TIntByteProcedure procedure)
TIntByteMapretainEntries in interface TIntByteMapprocedure - determines which entries to keeppublic boolean increment(int key)
TIntByteMapincrement in interface TIntByteMapkey - the key of the value to incrementpublic boolean adjustValue(int key,
byte amount)
TIntByteMapadjustValue in interface TIntByteMapkey - the key of the value to incrementamount - the amount to adjust the value by.public byte adjustOrPutValue(int key,
byte adjust_amount,
byte put_amount)
TIntByteMapadjustOrPutValue in interface TIntByteMapkey - 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