public class TUnmodifiableIntByteMap extends Objectimplements TIntByteMap , Serializable
| Constructor and Description |
|---|
TUnmodifiableIntByteMap(TIntByteMap
|
| Modifier and Type | Method and Description |
|---|---|
byte |
adjustOrPutValue(int 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(int key, byte 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(byte val)
Checks for the presence of
val in the values of the map.
|
boolean |
equals(Object
|
boolean |
forEachEntry(TIntByteProcedure
Executes
procedure for each key/value entry in the map.
|
boolean |
forEachKey(TIntProcedure
Executes
procedure for each key in the map.
|
boolean |
forEachValue(TByteProcedure
Executes
procedure for each value in the map.
|
byte |
get(int key)
Retrieves the value for
key
|
int |
getNoEntryKey()
Returns the value that will be returned from
TIntByteMap or
TIntByteMap if no entry exists for a given key.
|
byte |
getNoEntryValue()
Returns the value that will be returned from
TIntByteMap or
TIntByteMap 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.
|
TIntByteIterator |
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
|
byte |
put(int key, byte 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(TIntByteMap
Put all the entries from the given map into this map.
|
byte |
putIfAbsent(int key, byte value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.
|
byte |
remove(int key)
Deletes a key/value pair from the map.
|
boolean |
retainEntries(TIntByteProcedure
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(TByteFunction
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 TUnmodifiableIntByteMap(TIntByteMapm)
public int size()
TIntByteMap
size in interface
TIntByteMap
public boolean isEmpty()
TIntByteMap
isEmpty in interface
TIntByteMap
public boolean containsKey(int key)
TIntByteMap
containsKey in interface
TIntByteMap
key - an
int value
boolean value
public boolean containsValue(byte val)
TIntByteMap
containsValue in interface
TIntByteMap
val - an
byte value
boolean value
public byte get(int key)
TIntByteMap
get in interface
TIntByteMap
key - an
int value
TIntByteMap.getNoEntryValue() ).
public byte put(int key,
byte value)
TIntByteMap
put in interface
TIntByteMap
key - an
int value
value - an
byte value
TIntByteMap.getNoEntryValue() ).
public byte remove(int key)
TIntByteMap
remove in interface
TIntByteMap
key - an
int value
TIntByteMap.getNoEntryValue() ).
public void putAll(TIntByteMapm)
TIntByteMap
putAll in interface
TIntByteMap
m - The map from which entries will be obtained to put into this map.
public void putAll(Map<? extends Integer ,? extends Byte > map)
TIntByteMap
putAll in interface
TIntByteMap
map - The Map from which entries will be obtained to put into this map.
public void clear()
TIntByteMap
public TIntSetkeySet()
TIntByteMap
keySet in interface
TIntByteMap
public int[] keys()
TIntByteMap
keys in interface
TIntByteMap
public int[] keys(int[] array)
TIntByteMap
keys in interface
TIntByteMap
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 TByteCollectionvalueCollection()
TIntByteMap
valueCollection in interface
TIntByteMap
public byte[] values()
TIntByteMap
values in interface
TIntByteMap
public byte[] values(byte[] array)
TIntByteMap
values in interface
TIntByteMap
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()
TIntByteMap
TIntByteMap.get(int) or
TIntByteMap.put(int, byte) 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
TIntByteMap
public byte getNoEntryValue()
TIntByteMap
TIntByteMap.get(int) or
TIntByteMap.put(int, byte) 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
TIntByteMap
public boolean forEachKey(TIntProcedureprocedure)
TIntByteMap
forEachKey in interface
TIntByteMap
procedure - a
TIntProcedure value
public boolean forEachValue(TByteProcedureprocedure)
TIntByteMap
forEachValue in interface
TIntByteMap
procedure - a
T#F#Procedure value
public boolean forEachEntry(TIntByteProcedureprocedure)
TIntByteMap
forEachEntry in interface
TIntByteMap
procedure - a
TOIntByteProcedure value
public TIntByteIteratoriterator()
iterator in interface
TIntByteMap
public byte putIfAbsent(int key,
byte value)
TIntByteMap
putIfAbsent in interface
TIntByteMap
key - an
int value
value - an
byte value
TIntByteMap.getNoEntryValue() ).
public void transformValues(TByteFunctionfunction)
TIntByteMap
transformValues in interface
TIntByteMap
function - a
TByteFunction value
public boolean retainEntries(TIntByteProcedureprocedure)
TIntByteMap
retainEntries in interface
TIntByteMap
procedure - determines which entries to keep
public boolean increment(int key)
TIntByteMap
increment in interface
TIntByteMap
key - the key of the value to increment
public boolean adjustValue(int key,
byte amount)
TIntByteMap
adjustValue in interface
TIntByteMap
key - the key of the value to increment
amount - the amount to adjust the value by.
public byte adjustOrPutValue(int key,
byte adjust_amount,
byte put_amount)
TIntByteMap
adjustOrPutValue in interface
TIntByteMap
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