Externalizable
, Serializable
, ByteIterable
, ByteValuesMap
, IntByteMap
, MutableByteValuesMap
, MutableIntByteMap
, PrimitiveIterable
, MutableIntKeysMap
, IntKeysMap
public class IntByteHashMap extends AbstractMutableByteValuesMap implements MutableIntByteMap, Externalizable, MutableIntKeysMap
Constructor | Description |
---|---|
IntByteHashMap() |
|
IntByteHashMap(int initialCapacity) |
|
IntByteHashMap(IntByteMap map) |
Modifier and Type | Method | Description |
---|---|---|
byte |
addToValue(int key,
byte toBeAdded) |
|
MutableIntByteMap |
asSynchronized() |
|
MutableIntByteMap |
asUnmodifiable() |
|
MutableByteIterator |
byteIterator() |
Returns a primitive iterator that can be used to iterate over the ByteIterable in an
imperative style.
|
void |
clear() |
|
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(int key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntByteProcedure procedure) |
|
byte |
get(int key) |
|
byte |
getIfAbsent(int key,
byte ifAbsent) |
|
byte |
getIfAbsentPut(int key,
byte value) |
|
byte |
getIfAbsentPut(int key,
ByteFunction0 function) |
|
<P> byte |
getIfAbsentPutWith(int key,
ByteFunction<? super P> function,
P parameter) |
|
byte |
getIfAbsentPutWithKey(int key,
IntToByteFunction function) |
|
byte |
getOrThrow(int key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function) |
|
MutableIntSet |
keySet() |
|
LazyIntIterable |
keysView() |
|
RichIterable<IntBytePair> |
keyValuesView() |
|
static IntByteHashMap |
newWithKeysValues(int key1,
byte value1) |
|
static IntByteHashMap |
newWithKeysValues(int key1,
byte value1,
int key2,
byte value2) |
|
static IntByteHashMap |
newWithKeysValues(int key1,
byte value1,
int key2,
byte value2,
int key3,
byte value3) |
|
static IntByteHashMap |
newWithKeysValues(int key1,
byte value1,
int key2,
byte value2,
int key3,
byte value3,
int key4,
byte value4) |
|
void |
put(int key,
byte value) |
|
void |
putAll(IntByteMap map) |
|
void |
readExternal(ObjectInput in) |
|
IntByteHashMap |
reject(IntBytePredicate predicate) |
|
void |
remove(int key) |
|
void |
removeKey(int key) |
|
byte |
removeKeyIfAbsent(int key,
byte value) |
|
IntByteHashMap |
select(IntBytePredicate predicate) |
|
ImmutableIntByteMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
byte |
updateValue(int key,
byte initialValueIfAbsent,
ByteToByteFunction function) |
|
MutableByteCollection |
values() |
|
IntByteHashMap |
withKeysValues(int key1,
byte value1,
int key2,
byte value2) |
|
IntByteHashMap |
withKeysValues(int key1,
byte value1,
int key2,
byte value2,
int key3,
byte value3) |
|
IntByteHashMap |
withKeysValues(int key1,
byte value1,
int key2,
byte value2,
int key3,
byte value3,
int key4,
byte value4) |
|
IntByteHashMap |
withKeyValue(int key1,
byte value1) |
|
IntByteHashMap |
withoutAllKeys(IntIterable keys) |
|
IntByteHashMap |
withoutKey(int key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, anySatisfy, asLazy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue
isEmpty, notEmpty, size
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public IntByteHashMap()
public IntByteHashMap(int initialCapacity)
public IntByteHashMap(IntByteMap map)
public static IntByteHashMap newWithKeysValues(int key1, byte value1)
public static IntByteHashMap newWithKeysValues(int key1, byte value1, int key2, byte value2)
public static IntByteHashMap newWithKeysValues(int key1, byte value1, int key2, byte value2, int key3, byte value3)
public static IntByteHashMap newWithKeysValues(int key1, byte value1, int key2, byte value2, int key3, byte value3, int key4, byte value4)
public boolean equals(Object obj)
IntByteMap
Map.equals(Object)
.equals
in interface IntByteMap
equals
in class Object
public int hashCode()
IntByteMap
Map.hashCode()
.hashCode
in interface IntByteMap
hashCode
in class Object
public String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString()); Assert.assertEquals("[1]", IntLists.mutable.with(1).toString()); Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString
in interface IntByteMap
toString
in interface PrimitiveIterable
toString
in class AbstractByteIterable
AbstractCollection.toString()
public MutableByteIterator byteIterator()
ByteIterable
byteIterator
in interface ByteIterable
byteIterator
in interface MutableByteValuesMap
public <V> V injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)
injectInto
in interface ByteIterable
public void clear()
clear
in interface MutableByteValuesMap
clear
in interface MutableIntKeysMap
public void put(int key, byte value)
put
in interface MutableIntByteMap
public void putAll(IntByteMap map)
putAll
in interface MutableIntByteMap
public void removeKey(int key)
removeKey
in interface MutableIntByteMap
removeKey
in interface MutableIntKeysMap
public void remove(int key)
remove
in interface MutableIntByteMap
public byte removeKeyIfAbsent(int key, byte value)
removeKeyIfAbsent
in interface MutableIntByteMap
public byte getIfAbsentPut(int key, byte value)
getIfAbsentPut
in interface MutableIntByteMap
public byte getIfAbsentPut(int key, ByteFunction0 function)
getIfAbsentPut
in interface MutableIntByteMap
public <P> byte getIfAbsentPutWith(int key, ByteFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableIntByteMap
public byte getIfAbsentPutWithKey(int key, IntToByteFunction function)
getIfAbsentPutWithKey
in interface MutableIntByteMap
public byte addToValue(int key, byte toBeAdded)
addToValue
in interface MutableIntByteMap
public byte updateValue(int key, byte initialValueIfAbsent, ByteToByteFunction function)
updateValue
in interface MutableIntByteMap
public IntByteHashMap withKeyValue(int key1, byte value1)
withKeyValue
in interface MutableIntByteMap
public IntByteHashMap withKeysValues(int key1, byte value1, int key2, byte value2)
public IntByteHashMap withKeysValues(int key1, byte value1, int key2, byte value2, int key3, byte value3)
public IntByteHashMap withKeysValues(int key1, byte value1, int key2, byte value2, int key3, byte value3, int key4, byte value4)
public IntByteHashMap withoutKey(int key)
withoutKey
in interface MutableIntByteMap
public IntByteHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys
in interface MutableIntByteMap
public MutableIntByteMap asUnmodifiable()
asUnmodifiable
in interface MutableIntByteMap
public MutableIntByteMap asSynchronized()
asSynchronized
in interface MutableIntByteMap
public ImmutableIntByteMap toImmutable()
toImmutable
in interface IntByteMap
public byte get(int key)
get
in interface IntByteMap
public byte getIfAbsent(int key, byte ifAbsent)
getIfAbsent
in interface IntByteMap
public byte getOrThrow(int key)
getOrThrow
in interface IntByteMap
public boolean containsKey(int key)
containsKey
in interface IntByteMap
containsKey
in interface IntKeysMap
public void forEachKey(IntProcedure procedure)
forEachKey
in interface IntByteMap
forEachKey
in interface IntKeysMap
public void forEachKeyValue(IntByteProcedure procedure)
forEachKeyValue
in interface IntByteMap
public LazyIntIterable keysView()
keysView
in interface IntByteMap
public RichIterable<IntBytePair> keyValuesView()
keyValuesView
in interface IntByteMap
public IntByteHashMap select(IntBytePredicate predicate)
select
in interface IntByteMap
select
in interface MutableIntByteMap
public IntByteHashMap reject(IntBytePredicate predicate)
reject
in interface IntByteMap
reject
in interface MutableIntByteMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void compact()
public MutableIntSet keySet()
keySet
in interface IntByteMap
public MutableByteCollection values()
values
in interface ByteValuesMap
Copyright © 2004–2017. All rights reserved.