public class TUnmodifiableIntFloatMap extends Objectimplements TIntFloatMap , Serializable
| Constructor and Description |
|---|
TUnmodifiableIntFloatMap(TIntFloatMap
|
| Modifier and Type | Method and Description |
|---|---|
float |
adjustOrPutValue(int key, float adjust_amount, float put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(int key, float amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(int key)
Checks for the present of
key in the keys of the map.
|
boolean |
containsValue(float val)
Checks for the presence of
val in the values of the map.
|
boolean |
equals(Object
|
boolean |
forEachEntry(TIntFloatProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TIntProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TFloatProcedure
Executes
procedure for each value in the map.
|
float |
get(int key)
Retrieves the value for
key
|
int |
getNoEntryKey()
Returns the value that will be returned from
TIntFloatMap or
TIntFloatMap if no entry exists for a given key.
|
float |
getNoEntryValue()
Returns the value that will be returned from
TIntFloatMap or
TIntFloatMap if no entry exists for a given key.
|
int |
hashCode()
|
boolean |
increment(int key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings.
|
TIntFloatIterator |
iterator()
|
int[] |
keys()
Returns the keys of the map as an array of
int values.
|
int[] |
keys(int[] array)
Returns the keys of the map.
|
TIntSet |
keySet()
Returns the keys of the map as a
TIntSet
|
float |
put(int key, float value)
Inserts a key/value pair into the map.
|
void |
putAll(Map
Put all the entries from the given Map into this map.
|
void |
putAll(TIntFloatMap
Put all the entries from the given map into this map.
|
float |
putIfAbsent(int key, float value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
float |
remove(int key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TIntFloatProcedure
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.
|
String |
toString()
|
void |
transformValues(TFloatFunction
Transform the values in this map using
function.
|
TFloatCollection |
valueCollection()
Returns the values of the map as a
TFloatCollection
|
float[] |
values()
Returns the values of the map as an array of
#e# values.
|
float[] |
values(float[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableIntFloatMap(TIntFloatMapm)
public int size()
TIntFloatMap
size in interface
TIntFloatMap
public boolean isEmpty()
TIntFloatMap
isEmpty in interface
TIntFloatMap
public boolean containsKey(int key)
TIntFloatMap
containsKey in interface
TIntFloatMap
key - an
int value
boolean value
public boolean containsValue(float val)
TIntFloatMap
containsValue in interface
TIntFloatMap
val - an
float value
boolean value
public float get(int key)
TIntFloatMap
get in interface
TIntFloatMap
key - an
int value
TIntFloatMap.getNoEntryValue() ).
public float put(int key,
float value)
TIntFloatMap
put in interface
TIntFloatMap
key - an
int value
value - an
float value
TIntFloatMap.getNoEntryValue() ).
public float remove(int key)
TIntFloatMap
remove in interface
TIntFloatMap
key - an
int value
TIntFloatMap.getNoEntryValue() ).
public void putAll(TIntFloatMapm)
TIntFloatMap
putAll in interface
TIntFloatMap
m - The map from which entries will be obtained to put into this map.
public void putAll(Map<? extends Integer ,? extends Float > map)
TIntFloatMap
putAll in interface
TIntFloatMap
map - The Map from which entries will be obtained to put into this map.
public void clear()
TIntFloatMap
public TIntSetkeySet()
TIntFloatMap
keySet in interface
TIntFloatMap
public int[] keys()
TIntFloatMap
keys in interface
TIntFloatMap
public int[] keys(int[] array)
TIntFloatMap
keys in interface
TIntFloatMap
array - 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 TFloatCollectionvalueCollection()
TIntFloatMap
valueCollection in interface
TIntFloatMap
public float[] values()
TIntFloatMap
values in interface
TIntFloatMap
public float[] values(float[] array)
TIntFloatMap
values in interface
TIntFloatMap
array - 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(Objecto)
public int hashCode()
public StringtoString()
public int getNoEntryKey()
TIntFloatMap
TIntFloatMap.get(int) or
TIntFloatMap.put(int, float) if no entry exists for a given key. The default value is generally zero, but can be changed during construction of the collection.
getNoEntryKey in interface
TIntFloatMap
public float getNoEntryValue()
TIntFloatMap
TIntFloatMap.get(int) or
TIntFloatMap.put(int, float) if no entry exists for a given key. The default value is generally zero, but can be changed during construction of the collection.
getNoEntryValue in interface
TIntFloatMap
public boolean forEachKey(TIntProcedureprocedure)
TIntFloatMap
forEachKey in interface
TIntFloatMap
procedure - a
TIntProcedure value
public boolean forEachValue(TFloatProcedureprocedure)
TIntFloatMap
forEachValue in interface
TIntFloatMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TIntFloatProcedureprocedure)
TIntFloatMap
forEachEntry in interface
TIntFloatMap
procedure - a
TOIntFloatProcedure value
public TIntFloatIteratoriterator()
iterator in interface
TIntFloatMap
public float putIfAbsent(int key,
float value)
TIntFloatMap
putIfAbsent in interface
TIntFloatMap
key - an
int value
value - an
float value
TIntFloatMap.getNoEntryValue() ).
public void transformValues(TFloatFunctionfunction)
TIntFloatMap
transformValues in interface
TIntFloatMap
function - a
TFloatFunction value
public boolean retainEntries(TIntFloatProcedureprocedure)
TIntFloatMap
retainEntries in interface
TIntFloatMap
procedure - determines which entries to keep
public boolean increment(int key)
TIntFloatMap
increment in interface
TIntFloatMap
key - the key of the value to increment
public boolean adjustValue(int key,
float amount)
TIntFloatMap
adjustValue in interface
TIntFloatMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public float adjustOrPutValue(int key,
float adjust_amount,
float put_amount)
TIntFloatMap
adjustOrPutValue in interface
TIntFloatMap
key - the key of the value to increment
adjust_amount - the amount to adjust the value by
put_amount - the value put into the map if the key is not initial present