public class TSynchronizedCharByteMap extends java.lang.Object implements TCharByteMap, java.io.Serializable
| Constructor and Description |
|---|
TSynchronizedCharByteMap(TCharByteMap m) |
TSynchronizedCharByteMap(TCharByteMap m,
java.lang.Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(char 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(char key,
byte amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(char 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(TCharByteProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TCharProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TByteProcedure procedure)
Executes procedure for each value in the map.
|
byte |
get(char key)
Retrieves the value for key.
|
char |
getNoEntryKey()
Returns the value that will be returned from
TCharByteMap.get(char) or TCharByteMap.put(char, byte) if no
entry exists for a given key. |
byte |
getNoEntryValue()
Returns the value that will be returned from
TCharByteMap.get(char) or TCharByteMap.put(char, byte) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(char key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TCharByteIterator |
iterator() |
char[] |
keys()
Returns the keys of the map as an array of char values.
|
char[] |
keys(char[] array)
Returns the keys of the map.
|
TCharSet |
keySet()
Returns the keys of the map as a TCharSet
|
byte |
put(char key,
byte value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Byte> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TCharByteMap map)
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(char key,
byte value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
byte |
remove(char key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TCharByteProcedure 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 TSynchronizedCharByteMap(TCharByteMap m)
public TSynchronizedCharByteMap(TCharByteMap m, java.lang.Object mutex)
public int size()
TCharByteMapsize in interface TCharByteMappublic boolean isEmpty()
TCharByteMapisEmpty in interface TCharByteMappublic boolean containsKey(char key)
TCharByteMapcontainsKey in interface TCharByteMappublic boolean containsValue(byte value)
TCharByteMapcontainsValue in interface TCharByteMappublic byte get(char key)
TCharByteMapget in interface TCharByteMapTCharByteMap.getNoEntryValue()).public byte put(char key,
byte value)
TCharByteMapput in interface TCharByteMapTCharByteMap.getNoEntryValue()).public byte remove(char key)
TCharByteMapremove in interface TCharByteMapkey - an char valueTCharByteMap.getNoEntryValue()).public void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Byte> map)
TCharByteMapputAll in interface TCharByteMapmap - The Map from which entries will be obtained to put into this map.public void putAll(TCharByteMap map)
TCharByteMapputAll in interface TCharByteMapmap - The map from which entries will be obtained to put into this map.public void clear()
TCharByteMapclear in interface TCharByteMappublic TCharSet keySet()
TCharByteMapkeySet in interface TCharByteMappublic char[] keys()
TCharByteMapkeys in interface TCharByteMappublic char[] keys(char[] array)
TCharByteMapkeys in interface TCharByteMaparray - 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()
TCharByteMapvalueCollection in interface TCharByteMappublic byte[] values()
TCharByteMapvalues in interface TCharByteMappublic byte[] values(byte[] array)
TCharByteMapvalues in interface TCharByteMaparray - 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 TCharByteIterator iterator()
iterator in interface TCharByteMappublic char getNoEntryKey()
TCharByteMapTCharByteMap.get(char) or TCharByteMap.put(char, 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 TCharByteMappublic byte getNoEntryValue()
TCharByteMapTCharByteMap.get(char) or TCharByteMap.put(char, 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 TCharByteMappublic byte putIfAbsent(char key,
byte value)
TCharByteMapputIfAbsent in interface TCharByteMapTCharByteMap.getNoEntryValue()).public boolean forEachKey(TCharProcedure procedure)
TCharByteMapforEachKey in interface TCharByteMapprocedure - a TCharProcedure valuepublic boolean forEachValue(TByteProcedure procedure)
TCharByteMapforEachValue in interface TCharByteMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TCharByteProcedure procedure)
TCharByteMapforEachEntry in interface TCharByteMapprocedure - a TOCharByteProcedure valuepublic void transformValues(TByteFunction function)
TCharByteMaptransformValues in interface TCharByteMapfunction - a TByteFunction valuepublic boolean retainEntries(TCharByteProcedure procedure)
TCharByteMapretainEntries in interface TCharByteMapprocedure - determines which entries to keeppublic boolean increment(char key)
TCharByteMapincrement in interface TCharByteMapkey - the key of the value to incrementpublic boolean adjustValue(char key,
byte amount)
TCharByteMapadjustValue in interface TCharByteMapkey - the key of the value to incrementamount - the amount to adjust the value by.public byte adjustOrPutValue(char key,
byte adjust_amount,
byte put_amount)
TCharByteMapadjustOrPutValue in interface TCharByteMapkey - 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