java.io.Externalizable, java.io.Serializable, IntIterable, ByteIntMap, IntValuesMap, MutableByteIntMap, MutableIntValuesMap, PrimitiveIterable, MutableByteKeysMap, ByteKeysMappublic class ByteIntHashMap extends AbstractMutableIntValuesMap implements MutableByteIntMap, java.io.Externalizable, MutableByteKeysMap
| Constructor | Description |
|---|---|
ByteIntHashMap() |
|
ByteIntHashMap(int initialCapacity) |
|
ByteIntHashMap(ByteIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(byte key,
int toBeAdded) |
|
MutableByteIntMap |
asSynchronized() |
|
MutableByteIntMap |
asUnmodifiable() |
|
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(byte key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableIntByteMap |
flipUniqueValues() |
Return the IntByteMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ByteProcedure procedure) |
|
void |
forEachKeyValue(ByteIntProcedure procedure) |
|
int |
get(byte key) |
|
int |
getIfAbsent(byte key,
int ifAbsent) |
|
int |
getIfAbsentPut(byte key,
int value) |
|
int |
getIfAbsentPut(byte key,
IntFunction0 function) |
|
<P> int |
getIfAbsentPutWith(byte key,
IntFunction<? super P> function,
P parameter) |
|
int |
getIfAbsentPutWithKey(byte key,
ByteToIntFunction function) |
|
int |
getOrThrow(byte key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
MutableByteSet |
keySet() |
|
LazyByteIterable |
keysView() |
|
RichIterable<ByteIntPair> |
keyValuesView() |
|
static ByteIntHashMap |
newWithKeysValues(byte key1,
int value1) |
|
static ByteIntHashMap |
newWithKeysValues(byte key1,
int value1,
byte key2,
int value2) |
|
static ByteIntHashMap |
newWithKeysValues(byte key1,
int value1,
byte key2,
int value2,
byte key3,
int value3) |
|
static ByteIntHashMap |
newWithKeysValues(byte key1,
int value1,
byte key2,
int value2,
byte key3,
int value3,
byte key4,
int value4) |
|
void |
put(byte key,
int value) |
|
void |
putAll(ByteIntMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ByteIntHashMap |
reject(ByteIntPredicate predicate) |
|
void |
remove(byte key) |
|
void |
removeKey(byte key) |
|
int |
removeKeyIfAbsent(byte key,
int value) |
|
ByteIntHashMap |
select(ByteIntPredicate predicate) |
|
ImmutableByteIntMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
int |
updateValue(byte key,
int initialValueIfAbsent,
IntToIntFunction function) |
|
MutableIntCollection |
values() |
|
ByteIntHashMap |
withKeysValues(byte key1,
int value1,
byte key2,
int value2) |
|
ByteIntHashMap |
withKeysValues(byte key1,
int value1,
byte key2,
int value2,
byte key3,
int value3) |
|
ByteIntHashMap |
withKeysValues(byte key1,
int value1,
byte key2,
int value2,
byte key3,
int value3,
byte key4,
int value4) |
|
ByteIntHashMap |
withKeyValue(byte key1,
int value1) |
|
ByteIntHashMap |
withoutAllKeys(ByteIterable keys) |
|
ByteIntHashMap |
withoutKey(byte key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayisEmpty, notEmpty, sizeallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValue, tapputPaircollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic ByteIntHashMap()
public ByteIntHashMap(int initialCapacity)
public ByteIntHashMap(ByteIntMap map)
public static ByteIntHashMap newWithKeysValues(byte key1, int value1)
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2)
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
public boolean equals(java.lang.Object obj)
ByteIntMapMap.equals(Object).equals in interface ByteIntMapequals in class java.lang.Objectpublic int hashCode()
ByteIntMapMap.hashCode().hashCode in interface ByteIntMaphashCode in class java.lang.Objectpublic java.lang.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 ByteIntMaptoString in interface PrimitiveIterabletoString in class AbstractIntIterableAbstractCollection.toString()public MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic <V> V injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface IntIterablepublic void clear()
clear in interface MutableByteKeysMapclear in interface MutableIntValuesMappublic void put(byte key,
int value)
put in interface MutableByteIntMappublic void putAll(ByteIntMap map)
putAll in interface MutableByteIntMappublic void removeKey(byte key)
removeKey in interface MutableByteIntMapremoveKey in interface MutableByteKeysMappublic void remove(byte key)
remove in interface MutableByteIntMappublic int removeKeyIfAbsent(byte key,
int value)
removeKeyIfAbsent in interface MutableByteIntMappublic int getIfAbsentPut(byte key,
int value)
getIfAbsentPut in interface MutableByteIntMappublic int getIfAbsentPut(byte key,
IntFunction0 function)
getIfAbsentPut in interface MutableByteIntMappublic <P> int getIfAbsentPutWith(byte key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableByteIntMappublic int getIfAbsentPutWithKey(byte key,
ByteToIntFunction function)
getIfAbsentPutWithKey in interface MutableByteIntMappublic int addToValue(byte key,
int toBeAdded)
addToValue in interface MutableByteIntMappublic int updateValue(byte key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableByteIntMappublic ByteIntHashMap withKeyValue(byte key1, int value1)
withKeyValue in interface MutableByteIntMappublic ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2)
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
public ByteIntHashMap withoutKey(byte key)
withoutKey in interface MutableByteIntMappublic ByteIntHashMap withoutAllKeys(ByteIterable keys)
withoutAllKeys in interface MutableByteIntMappublic MutableByteIntMap asUnmodifiable()
asUnmodifiable in interface MutableByteIntMappublic MutableByteIntMap asSynchronized()
asSynchronized in interface MutableByteIntMappublic ImmutableByteIntMap toImmutable()
toImmutable in interface ByteIntMappublic int get(byte key)
get in interface ByteIntMappublic int getIfAbsent(byte key,
int ifAbsent)
getIfAbsent in interface ByteIntMappublic int getOrThrow(byte key)
getOrThrow in interface ByteIntMappublic boolean containsKey(byte key)
containsKey in interface ByteIntMapcontainsKey in interface ByteKeysMappublic void forEachKey(ByteProcedure procedure)
forEachKey in interface ByteIntMapforEachKey in interface ByteKeysMappublic void forEachKeyValue(ByteIntProcedure procedure)
forEachKeyValue in interface ByteIntMappublic LazyByteIterable keysView()
keysView in interface ByteIntMappublic RichIterable<ByteIntPair> keyValuesView()
keyValuesView in interface ByteIntMappublic MutableIntByteMap flipUniqueValues()
ByteIntMapflipUniqueValues in interface ByteIntMapflipUniqueValues in interface MutableByteIntMappublic ByteIntHashMap select(ByteIntPredicate predicate)
select in interface ByteIntMapselect in interface MutableByteIntMappublic ByteIntHashMap reject(ByteIntPredicate predicate)
reject in interface ByteIntMapreject in interface MutableByteIntMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
public MutableByteSet keySet()
keySet in interface ByteIntMappublic MutableIntCollection values()
values in interface IntValuesMapCopyright © 2004–2018. All rights reserved.