public class TUnmodifiableCharDoubleMap extends java.lang.Object implements TCharDoubleMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableCharDoubleMap(TCharDoubleMap m) |
| Modifier and Type | Method and Description |
|---|---|
double |
adjustOrPutValue(char key,
double adjust_amount,
double put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(char key,
double 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(double val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TCharDoubleProcedure 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(TDoubleProcedure procedure)
Executes procedure for each value in the map.
|
double |
get(char key)
Retrieves the value for key.
|
char |
getNoEntryKey()
Returns the value that will be returned from
TCharDoubleMap.get(char) or TCharDoubleMap.put(char, double) if no
entry exists for a given key. |
double |
getNoEntryValue()
Returns the value that will be returned from
TCharDoubleMap.get(char) or TCharDoubleMap.put(char, double) 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.
|
TCharDoubleIterator |
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
|
double |
put(char key,
double value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Double> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TCharDoubleMap m)
Put all the entries from the given map into this map.
|
double |
putIfAbsent(char key,
double value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
double |
remove(char key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TCharDoubleProcedure 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(TDoubleFunction function)
Transform the values in this map using function.
|
TDoubleCollection |
valueCollection()
Returns the values of the map as a TDoubleCollection
|
double[] |
values()
Returns the values of the map as an array of #e# values.
|
double[] |
values(double[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableCharDoubleMap(TCharDoubleMap m)
public int size()
TCharDoubleMapsize in interface TCharDoubleMappublic boolean isEmpty()
TCharDoubleMapisEmpty in interface TCharDoubleMappublic boolean containsKey(char key)
TCharDoubleMapcontainsKey in interface TCharDoubleMappublic boolean containsValue(double val)
TCharDoubleMapcontainsValue in interface TCharDoubleMappublic double get(char key)
TCharDoubleMapget in interface TCharDoubleMapTCharDoubleMap.getNoEntryValue()).public double put(char key,
double value)
TCharDoubleMapput in interface TCharDoubleMapTCharDoubleMap.getNoEntryValue()).public double remove(char key)
TCharDoubleMapremove in interface TCharDoubleMapkey - an char valueTCharDoubleMap.getNoEntryValue()).public void putAll(TCharDoubleMap m)
TCharDoubleMapputAll in interface TCharDoubleMapm - The map from which entries will be obtained to put into this map.public void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Double> map)
TCharDoubleMapputAll in interface TCharDoubleMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TCharDoubleMapclear in interface TCharDoubleMappublic TCharSet keySet()
TCharDoubleMapkeySet in interface TCharDoubleMappublic char[] keys()
TCharDoubleMapkeys in interface TCharDoubleMappublic char[] keys(char[] array)
TCharDoubleMapkeys in interface TCharDoubleMaparray - 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 TDoubleCollection valueCollection()
TCharDoubleMapvalueCollection in interface TCharDoubleMappublic double[] values()
TCharDoubleMapvalues in interface TCharDoubleMappublic double[] values(double[] array)
TCharDoubleMapvalues in interface TCharDoubleMaparray - 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 char getNoEntryKey()
TCharDoubleMapTCharDoubleMap.get(char) or TCharDoubleMap.put(char, double) 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 TCharDoubleMappublic double getNoEntryValue()
TCharDoubleMapTCharDoubleMap.get(char) or TCharDoubleMap.put(char, double) 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 TCharDoubleMappublic boolean forEachKey(TCharProcedure procedure)
TCharDoubleMapforEachKey in interface TCharDoubleMapprocedure - a TCharProcedure valuepublic boolean forEachValue(TDoubleProcedure procedure)
TCharDoubleMapforEachValue in interface TCharDoubleMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TCharDoubleProcedure procedure)
TCharDoubleMapforEachEntry in interface TCharDoubleMapprocedure - a TOCharDoubleProcedure valuepublic TCharDoubleIterator iterator()
iterator in interface TCharDoubleMappublic double putIfAbsent(char key,
double value)
TCharDoubleMapputIfAbsent in interface TCharDoubleMapTCharDoubleMap.getNoEntryValue()).public void transformValues(TDoubleFunction function)
TCharDoubleMaptransformValues in interface TCharDoubleMapfunction - a TDoubleFunction valuepublic boolean retainEntries(TCharDoubleProcedure procedure)
TCharDoubleMapretainEntries in interface TCharDoubleMapprocedure - determines which entries to keeppublic boolean increment(char key)
TCharDoubleMapincrement in interface TCharDoubleMapkey - the key of the value to incrementpublic boolean adjustValue(char key,
double amount)
TCharDoubleMapadjustValue in interface TCharDoubleMapkey - the key of the value to incrementamount - the amount to adjust the value by.public double adjustOrPutValue(char key,
double adjust_amount,
double put_amount)
TCharDoubleMapadjustOrPutValue in interface TCharDoubleMapkey - 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