public class TUnmodifiableDoubleShortMap extends java.lang.Object implements TDoubleShortMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableDoubleShortMap(TDoubleShortMap m) |
| Modifier and Type | Method and Description |
|---|---|
short |
adjustOrPutValue(double key,
short adjust_amount,
short put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(double key,
short amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(double key)
Checks for the present of key in the keys of the map.
|
boolean |
containsValue(short val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TDoubleShortProcedure procedure)
Executes procedure for each key/value entry in the
map.
|
boolean |
forEachKey(TDoubleProcedure procedure)
Executes procedure for each key in the map.
|
boolean |
forEachValue(TShortProcedure procedure)
Executes procedure for each value in the map.
|
short |
get(double key)
Retrieves the value for key.
|
double |
getNoEntryKey()
Returns the value that will be returned from
TDoubleShortMap.get(double) or TDoubleShortMap.put(double, short) if no
entry exists for a given key. |
short |
getNoEntryValue()
Returns the value that will be returned from
TDoubleShortMap.get(double) or TDoubleShortMap.put(double, short) if no
entry exists for a given key. |
int |
hashCode() |
boolean |
increment(double key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
TDoubleShortIterator |
iterator() |
double[] |
keys()
Returns the keys of the map as an array of double values.
|
double[] |
keys(double[] array)
Returns the keys of the map.
|
TDoubleSet |
keySet()
Returns the keys of the map as a TDoubleSet
|
short |
put(double key,
short value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TDoubleShortMap m)
Put all the entries from the given map into this map.
|
short |
putIfAbsent(double key,
short value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
short |
remove(double key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TDoubleShortProcedure 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(TShortFunction function)
Transform the values in this map using function.
|
TShortCollection |
valueCollection()
Returns the values of the map as a TShortCollection
|
short[] |
values()
Returns the values of the map as an array of #e# values.
|
short[] |
values(short[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableDoubleShortMap(TDoubleShortMap m)
public int size()
TDoubleShortMapsize in interface TDoubleShortMappublic boolean isEmpty()
TDoubleShortMapisEmpty in interface TDoubleShortMappublic boolean containsKey(double key)
TDoubleShortMapcontainsKey in interface TDoubleShortMappublic boolean containsValue(short val)
TDoubleShortMapcontainsValue in interface TDoubleShortMappublic short get(double key)
TDoubleShortMapget in interface TDoubleShortMapTDoubleShortMap.getNoEntryValue()).public short put(double key,
short value)
TDoubleShortMapput in interface TDoubleShortMapTDoubleShortMap.getNoEntryValue()).public short remove(double key)
TDoubleShortMapremove in interface TDoubleShortMapkey - an double valueTDoubleShortMap.getNoEntryValue()).public void putAll(TDoubleShortMap m)
TDoubleShortMapputAll in interface TDoubleShortMapm - The map from which entries will be obtained to put into this map.public void putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> map)
TDoubleShortMapputAll in interface TDoubleShortMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TDoubleShortMapclear in interface TDoubleShortMappublic TDoubleSet keySet()
TDoubleShortMapkeySet in interface TDoubleShortMappublic double[] keys()
TDoubleShortMapkeys in interface TDoubleShortMappublic double[] keys(double[] array)
TDoubleShortMapkeys in interface TDoubleShortMaparray - 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 TShortCollection valueCollection()
TDoubleShortMapvalueCollection in interface TDoubleShortMappublic short[] values()
TDoubleShortMapvalues in interface TDoubleShortMappublic short[] values(short[] array)
TDoubleShortMapvalues in interface TDoubleShortMaparray - 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 double getNoEntryKey()
TDoubleShortMapTDoubleShortMap.get(double) or TDoubleShortMap.put(double, short) 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 TDoubleShortMappublic short getNoEntryValue()
TDoubleShortMapTDoubleShortMap.get(double) or TDoubleShortMap.put(double, short) 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 TDoubleShortMappublic boolean forEachKey(TDoubleProcedure procedure)
TDoubleShortMapforEachKey in interface TDoubleShortMapprocedure - a TDoubleProcedure valuepublic boolean forEachValue(TShortProcedure procedure)
TDoubleShortMapforEachValue in interface TDoubleShortMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TDoubleShortProcedure procedure)
TDoubleShortMapforEachEntry in interface TDoubleShortMapprocedure - a TODoubleShortProcedure valuepublic TDoubleShortIterator iterator()
iterator in interface TDoubleShortMappublic short putIfAbsent(double key,
short value)
TDoubleShortMapputIfAbsent in interface TDoubleShortMapTDoubleShortMap.getNoEntryValue()).public void transformValues(TShortFunction function)
TDoubleShortMaptransformValues in interface TDoubleShortMapfunction - a TShortFunction valuepublic boolean retainEntries(TDoubleShortProcedure procedure)
TDoubleShortMapretainEntries in interface TDoubleShortMapprocedure - determines which entries to keeppublic boolean increment(double key)
TDoubleShortMapincrement in interface TDoubleShortMapkey - the key of the value to incrementpublic boolean adjustValue(double key,
short amount)
TDoubleShortMapadjustValue in interface TDoubleShortMapkey - the key of the value to incrementamount - the amount to adjust the value by.public short adjustOrPutValue(double key,
short adjust_amount,
short put_amount)
TDoubleShortMapadjustOrPutValue in interface TDoubleShortMapkey - 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