public class TUnmodifiableCharIntMap extends Objectimplements TCharIntMap , Serializable
| Constructor and Description |
|---|
TUnmodifiableCharIntMap(TCharIntMap
|
| Modifier and Type | Method and Description |
|---|---|
int |
adjustOrPutValue(char key, int adjust_amount, int put_amount)
Adjusts the primitive value mapped to the key if the key is present in the map.
|
boolean |
adjustValue(char key, int 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(int val)
Checks for the presence of
val in the values of the map.
|
boolean |
equals(Object
|
boolean |
forEachEntry(TCharIntProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TCharProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TIntProcedure
Executes
procedure for each value in the map.
|
int |
get(char key)
Retrieves the value for
key
|
char |
getNoEntryKey()
Returns the value that will be returned from
TCharIntMap or
TCharIntMap if no entry exists for a given key.
|
int |
getNoEntryValue()
Returns the value that will be returned from
TCharIntMap or
TCharIntMap 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.
|
TCharIntIterator |
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
|
int |
put(char key, int 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(TCharIntMap
Put all the entries from the given map into this map.
|
int |
putIfAbsent(char key, int value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
int |
remove(char key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TCharIntProcedure
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(TIntFunction
Transform the values in this map using
function.
|
TIntCollection |
valueCollection()
Returns the values of the map as a
TIntCollection
|
int[] |
values()
Returns the values of the map as an array of
#e# values.
|
int[] |
values(int[] array)
Returns the values of the map using an existing array.
|
public TUnmodifiableCharIntMap(TCharIntMapm)
public int size()
TCharIntMap
size in interface
TCharIntMap
public boolean isEmpty()
TCharIntMap
isEmpty in interface
TCharIntMap
public boolean containsKey(char key)
TCharIntMap
containsKey in interface
TCharIntMap
key - an
char value
boolean value
public boolean containsValue(int val)
TCharIntMap
containsValue in interface
TCharIntMap
val - an
int value
boolean value
public int get(char key)
TCharIntMap
get in interface
TCharIntMap
key - an
char value
TCharIntMap.getNoEntryValue() ).
public int put(char key,
int value)
TCharIntMap
put in interface
TCharIntMap
key - an
char value
value - an
int value
TCharIntMap.getNoEntryValue() ).
public int remove(char key)
TCharIntMap
remove in interface
TCharIntMap
key - an
char value
TCharIntMap.getNoEntryValue() ).
public void putAll(TCharIntMapm)
TCharIntMap
putAll in interface
TCharIntMap
m - The map from which entries will be obtained to put into this map.
public void putAll(Map<? extends Character ,? extends Integer > map)
TCharIntMap
putAll in interface
TCharIntMap
map - The Map from which entries will be obtained to put into this map.
public void clear()
TCharIntMap
public TCharSetkeySet()
TCharIntMap
keySet in interface
TCharIntMap
public char[] keys()
TCharIntMap
keys in interface
TCharIntMap
public char[] keys(char[] array)
TCharIntMap
keys in interface
TCharIntMap
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 TIntCollectionvalueCollection()
TCharIntMap
valueCollection in interface
TCharIntMap
public int[] values()
TCharIntMap
values in interface
TCharIntMap
public int[] values(int[] array)
TCharIntMap
values in interface
TCharIntMap
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 char getNoEntryKey()
TCharIntMap
TCharIntMap.get(char) or
TCharIntMap.put(char, int) 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
TCharIntMap
public int getNoEntryValue()
TCharIntMap
TCharIntMap.get(char) or
TCharIntMap.put(char, int) 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
TCharIntMap
public boolean forEachKey(TCharProcedureprocedure)
TCharIntMap
forEachKey in interface
TCharIntMap
procedure - a
TCharProcedure value
public boolean forEachValue(TIntProcedureprocedure)
TCharIntMap
forEachValue in interface
TCharIntMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TCharIntProcedureprocedure)
TCharIntMap
forEachEntry in interface
TCharIntMap
procedure - a
TOCharIntProcedure value
public TCharIntIteratoriterator()
iterator in interface
TCharIntMap
public int putIfAbsent(char key,
int value)
TCharIntMap
putIfAbsent in interface
TCharIntMap
key - an
char value
value - an
int value
TCharIntMap.getNoEntryValue() ).
public void transformValues(TIntFunctionfunction)
TCharIntMap
transformValues in interface
TCharIntMap
function - a
TIntFunction value
public boolean retainEntries(TCharIntProcedureprocedure)
TCharIntMap
retainEntries in interface
TCharIntMap
procedure - determines which entries to keep
public boolean increment(char key)
TCharIntMap
increment in interface
TCharIntMap
key - the key of the value to increment
public boolean adjustValue(char key,
int amount)
TCharIntMap
adjustValue in interface
TCharIntMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public int adjustOrPutValue(char key,
int adjust_amount,
int put_amount)
TCharIntMap
adjustOrPutValue in interface
TCharIntMap
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