public class TUnmodifiableByteIntMap extends Objectimplements TByteIntMap , Serializable
| Constructor and Description |
|---|
TUnmodifiableByteIntMap(TByteIntMap
|
| Modifier and Type | Method and Description |
|---|---|
int |
adjustOrPutValue(byte 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(byte key, int amount)
Adjusts the primitive value mapped to key.
|
void |
clear()
Empties the map.
|
boolean |
containsKey(byte 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(TByteIntProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TByteProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TIntProcedure
Executes
procedure for each value in the map.
|
int |
get(byte key)
Retrieves the value for
key
|
byte |
getNoEntryKey()
Returns the value that will be returned from
TByteIntMap or
TByteIntMap if no entry exists for a given key.
|
int |
getNoEntryValue()
Returns the value that will be returned from
TByteIntMap or
TByteIntMap if no entry exists for a given key.
|
int |
hashCode()
|
boolean |
increment(byte key)
Increments the primitive value mapped to key by 1
|
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings.
|
TByteIntIterator |
iterator()
|
byte[] |
keys()
Returns the keys of the map as an array of
byte values.
|
byte[] |
keys(byte[] array)
Returns the keys of the map.
|
TByteSet |
keySet()
Returns the keys of the map as a
TByteSet
|
int |
put(byte 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(TByteIntMap
Put all the entries from the given map into this map.
|
int |
putIfAbsent(byte key, int value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
int |
remove(byte key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TByteIntProcedure
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 TUnmodifiableByteIntMap(TByteIntMapm)
public int size()
TByteIntMap
size in interface
TByteIntMap
public boolean isEmpty()
TByteIntMap
isEmpty in interface
TByteIntMap
public boolean containsKey(byte key)
TByteIntMap
containsKey in interface
TByteIntMap
key - an
byte value
boolean value
public boolean containsValue(int val)
TByteIntMap
containsValue in interface
TByteIntMap
val - an
int value
boolean value
public int get(byte key)
TByteIntMap
get in interface
TByteIntMap
key - an
byte value
TByteIntMap.getNoEntryValue() ).
public int put(byte key,
int value)
TByteIntMap
put in interface
TByteIntMap
key - an
byte value
value - an
int value
TByteIntMap.getNoEntryValue() ).
public int remove(byte key)
TByteIntMap
remove in interface
TByteIntMap
key - an
byte value
TByteIntMap.getNoEntryValue() ).
public void putAll(TByteIntMapm)
TByteIntMap
putAll in interface
TByteIntMap
m - The map from which entries will be obtained to put into this map.
public void putAll(Map<? extends Byte ,? extends Integer > map)
TByteIntMap
putAll in interface
TByteIntMap
map - The Map from which entries will be obtained to put into this map.
public void clear()
TByteIntMap
public TByteSetkeySet()
TByteIntMap
keySet in interface
TByteIntMap
public byte[] keys()
TByteIntMap
keys in interface
TByteIntMap
public byte[] keys(byte[] array)
TByteIntMap
keys in interface
TByteIntMap
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()
TByteIntMap
valueCollection in interface
TByteIntMap
public int[] values()
TByteIntMap
values in interface
TByteIntMap
public int[] values(int[] array)
TByteIntMap
values in interface
TByteIntMap
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 byte getNoEntryKey()
TByteIntMap
TByteIntMap.get(byte) or
TByteIntMap.put(byte, 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
TByteIntMap
public int getNoEntryValue()
TByteIntMap
TByteIntMap.get(byte) or
TByteIntMap.put(byte, 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
TByteIntMap
public boolean forEachKey(TByteProcedureprocedure)
TByteIntMap
forEachKey in interface
TByteIntMap
procedure - a
TByteProcedure value
public boolean forEachValue(TIntProcedureprocedure)
TByteIntMap
forEachValue in interface
TByteIntMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TByteIntProcedureprocedure)
TByteIntMap
forEachEntry in interface
TByteIntMap
procedure - a
TOByteIntProcedure value
public TByteIntIteratoriterator()
iterator in interface
TByteIntMap
public int putIfAbsent(byte key,
int value)
TByteIntMap
putIfAbsent in interface
TByteIntMap
key - an
byte value
value - an
int value
TByteIntMap.getNoEntryValue() ).
public void transformValues(TIntFunctionfunction)
TByteIntMap
transformValues in interface
TByteIntMap
function - a
TIntFunction value
public boolean retainEntries(TByteIntProcedureprocedure)
TByteIntMap
retainEntries in interface
TByteIntMap
procedure - determines which entries to keep
public boolean increment(byte key)
TByteIntMap
increment in interface
TByteIntMap
key - the key of the value to increment
public boolean adjustValue(byte key,
int amount)
TByteIntMap
adjustValue in interface
TByteIntMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public int adjustOrPutValue(byte key,
int adjust_amount,
int put_amount)
TByteIntMap
adjustOrPutValue in interface
TByteIntMap
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