public class TUnmodifiableLongCharMap extends java.lang.Object implements TLongCharMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableLongCharMap(TLongCharMap m) |
| Modifier and Type | Method and Description |
|---|---|
char |
adjustOrPutValue(long key,
char adjust_amount,
char put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(long key,
char amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(long key)
Checks for the present of key in the keys of the map.
|
boolean |
containsValue(char val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TLongCharProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TLongProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TCharProcedure procedure)
Executes procedure for each value in the map.
|
char |
get(long key)
Retrieves the value for key.
|
long |
getNoEntryKey()
Returns the value that will be returned from
TLongCharMap.get(long) or TLongCharMap.put(long, char) if no
entry exists for a given key. |
char |
getNoEntryValue()
Returns the value that will be returned from
TLongCharMap.get(long) or TLongCharMap.put(long, char) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(long key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TLongCharIterator |
iterator() |
long[] |
keys()
Returns the keys of the map as an array of long values.
|
long[] |
keys(long[] array)
Returns the keys of the map.
|
TLongSet |
keySet()
Returns the keys of the map as a TLongSet
|
char |
put(long key,
char value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Character> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TLongCharMap m)
Put all the entries from the given map into this map.
|
char |
putIfAbsent(long key,
char value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
char |
remove(long key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TLongCharProcedure 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(TCharFunction function)
Transform the values in this map using function.
|
TCharCollection |
valueCollection()
Returns the values of the map as a TCharCollection
|
char[] |
values()
Returns the values of the map as an array of #e# values.
|
char[] |
values(char[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableLongCharMap(TLongCharMap m)
public int size()
TLongCharMapsize in interface TLongCharMappublic boolean isEmpty()
TLongCharMapisEmpty in interface TLongCharMappublic boolean containsKey(long key)
TLongCharMapcontainsKey in interface TLongCharMappublic boolean containsValue(char val)
TLongCharMapcontainsValue in interface TLongCharMappublic char get(long key)
TLongCharMapget in interface TLongCharMapTLongCharMap.getNoEntryValue()).public char put(long key,
char value)
TLongCharMapput in interface TLongCharMapTLongCharMap.getNoEntryValue()).public char remove(long key)
TLongCharMapremove in interface TLongCharMapkey - an long valueTLongCharMap.getNoEntryValue()).public void putAll(TLongCharMap m)
TLongCharMapputAll in interface TLongCharMapm - The map from which entries will be obtained to put into this map.public void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Character> map)
TLongCharMapputAll in interface TLongCharMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TLongCharMapclear in interface TLongCharMappublic TLongSet keySet()
TLongCharMapkeySet in interface TLongCharMappublic long[] keys()
TLongCharMapkeys in interface TLongCharMappublic long[] keys(long[] array)
TLongCharMapkeys in interface TLongCharMaparray - 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 TCharCollection valueCollection()
TLongCharMapvalueCollection in interface TLongCharMappublic char[] values()
TLongCharMapvalues in interface TLongCharMappublic char[] values(char[] array)
TLongCharMapvalues in interface TLongCharMaparray - 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 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.Objectpublic long getNoEntryKey()
TLongCharMapTLongCharMap.get(long) or TLongCharMap.put(long, char) 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 TLongCharMappublic char getNoEntryValue()
TLongCharMapTLongCharMap.get(long) or TLongCharMap.put(long, char) 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 TLongCharMappublic boolean forEachKey(TLongProcedure procedure)
TLongCharMapforEachKey in interface TLongCharMapprocedure - a TLongProcedure valuepublic boolean forEachValue(TCharProcedure procedure)
TLongCharMapforEachValue in interface TLongCharMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TLongCharProcedure procedure)
TLongCharMapforEachEntry in interface TLongCharMapprocedure - a TOLongCharProcedure valuepublic TLongCharIterator iterator()
iterator in interface TLongCharMappublic char putIfAbsent(long key,
char value)
TLongCharMapputIfAbsent in interface TLongCharMapTLongCharMap.getNoEntryValue()).public void transformValues(TCharFunction function)
TLongCharMaptransformValues in interface TLongCharMapfunction - a TCharFunction valuepublic boolean retainEntries(TLongCharProcedure procedure)
TLongCharMapretainEntries in interface TLongCharMapprocedure - determines which entries to keeppublic boolean increment(long key)
TLongCharMapincrement in interface TLongCharMapkey - the key of the value to incrementpublic boolean adjustValue(long key,
char amount)
TLongCharMapadjustValue in interface TLongCharMapkey - the key of the value to incrementamount - the amount to adjust the value by.public char adjustOrPutValue(long key,
char adjust_amount,
char put_amount)
TLongCharMapadjustOrPutValue in interface TLongCharMapkey - 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 present