public class TUnmodifiableDoubleByteMap extends java.lang.Object implements TDoubleByteMap, java.io.Serializable
| Constructor and Description |
|---|
TUnmodifiableDoubleByteMap(TDoubleByteMap m) |
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(double 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(double key,
byte 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(byte val)
Checks for the presence of val in the values of the map.
|
boolean |
equals(java.lang.Object o) |
boolean |
forEachEntry(TDoubleByteProcedure 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(TByteProcedure procedure)
Executes procedure for each value in the map.
|
byte |
get(double key)
Retrieves the value for key.
|
double |
getNoEntryKey()
Returns the value that will be returned from
TDoubleByteMap.get(double) or TDoubleByteMap.put(double, byte) if no
entry exists for a given key. |
byte |
getNoEntryValue()
Returns the value that will be returned from
TDoubleByteMap.get(double) or TDoubleByteMap.put(double, byte) 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.
|
TDoubleByteIterator |
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
|
byte |
put(double key,
byte value)
Inserts a key/value pair into the map.
|
void |
putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Byte> map)
Put all the entries from the given Map into this map.
|
void |
putAll(TDoubleByteMap m)
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(double key,
byte value)
Inserts a key/value pair into the map if the specified key is not already
associated with a value.
|
byte |
remove(double key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TDoubleByteProcedure 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 TUnmodifiableDoubleByteMap(TDoubleByteMap m)
public int size()
TDoubleByteMapsize in interface TDoubleByteMappublic boolean isEmpty()
TDoubleByteMapisEmpty in interface TDoubleByteMappublic boolean containsKey(double key)
TDoubleByteMapcontainsKey in interface TDoubleByteMappublic boolean containsValue(byte val)
TDoubleByteMapcontainsValue in interface TDoubleByteMappublic byte get(double key)
TDoubleByteMapget in interface TDoubleByteMapTDoubleByteMap.getNoEntryValue()).public byte put(double key,
byte value)
TDoubleByteMapput in interface TDoubleByteMapTDoubleByteMap.getNoEntryValue()).public byte remove(double key)
TDoubleByteMapremove in interface TDoubleByteMapkey - an double valueTDoubleByteMap.getNoEntryValue()).public void putAll(TDoubleByteMap m)
TDoubleByteMapputAll in interface TDoubleByteMapm - 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.Byte> map)
TDoubleByteMapputAll in interface TDoubleByteMapmap - The Map from which entries will be obtained to put into this map.public void clear()
TDoubleByteMapclear in interface TDoubleByteMappublic TDoubleSet keySet()
TDoubleByteMapkeySet in interface TDoubleByteMappublic double[] keys()
TDoubleByteMapkeys in interface TDoubleByteMappublic double[] keys(double[] array)
TDoubleByteMapkeys in interface TDoubleByteMaparray - 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()
TDoubleByteMapvalueCollection in interface TDoubleByteMappublic byte[] values()
TDoubleByteMapvalues in interface TDoubleByteMappublic byte[] values(byte[] array)
TDoubleByteMapvalues in interface TDoubleByteMaparray - 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()
TDoubleByteMapTDoubleByteMap.get(double) or TDoubleByteMap.put(double, 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 TDoubleByteMappublic byte getNoEntryValue()
TDoubleByteMapTDoubleByteMap.get(double) or TDoubleByteMap.put(double, 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 TDoubleByteMappublic boolean forEachKey(TDoubleProcedure procedure)
TDoubleByteMapforEachKey in interface TDoubleByteMapprocedure - a TDoubleProcedure valuepublic boolean forEachValue(TByteProcedure procedure)
TDoubleByteMapforEachValue in interface TDoubleByteMapprocedure - a T#F#Procedure valuepublic boolean forEachEntry(TDoubleByteProcedure procedure)
TDoubleByteMapforEachEntry in interface TDoubleByteMapprocedure - a TODoubleByteProcedure valuepublic TDoubleByteIterator iterator()
iterator in interface TDoubleByteMappublic byte putIfAbsent(double key,
byte value)
TDoubleByteMapputIfAbsent in interface TDoubleByteMapTDoubleByteMap.getNoEntryValue()).public void transformValues(TByteFunction function)
TDoubleByteMaptransformValues in interface TDoubleByteMapfunction - a TByteFunction valuepublic boolean retainEntries(TDoubleByteProcedure procedure)
TDoubleByteMapretainEntries in interface TDoubleByteMapprocedure - determines which entries to keeppublic boolean increment(double key)
TDoubleByteMapincrement in interface TDoubleByteMapkey - the key of the value to incrementpublic boolean adjustValue(double key,
byte amount)
TDoubleByteMapadjustValue in interface TDoubleByteMapkey - the key of the value to incrementamount - the amount to adjust the value by.public byte adjustOrPutValue(double key,
byte adjust_amount,
byte put_amount)
TDoubleByteMapadjustOrPutValue in interface TDoubleByteMapkey - 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