java.io.Externalizable, java.io.Serializable, ByteIterable, ByteValuesMap, MutableByteValuesMap, MutableShortByteMap, ShortByteMap, PrimitiveIterable, MutableShortKeysMap, ShortKeysMappublic class ShortByteHashMap extends AbstractMutableByteValuesMap implements MutableShortByteMap, java.io.Externalizable, MutableShortKeysMap
| Constructor | Description |
|---|---|
ShortByteHashMap() |
|
ShortByteHashMap(int initialCapacity) |
|
ShortByteHashMap(ShortByteMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
byte |
addToValue(short key,
byte toBeAdded) |
|
MutableShortByteMap |
asSynchronized() |
|
MutableShortByteMap |
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(short key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableByteShortMap |
flipUniqueValues() |
Return the ByteShortMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ShortProcedure procedure) |
|
void |
forEachKeyValue(ShortByteProcedure procedure) |
|
byte |
get(short key) |
|
byte |
getIfAbsent(short key,
byte ifAbsent) |
|
byte |
getIfAbsentPut(short key,
byte value) |
|
byte |
getIfAbsentPut(short key,
ByteFunction0 function) |
|
<P> byte |
getIfAbsentPutWith(short key,
ByteFunction<? super P> function,
P parameter) |
|
byte |
getIfAbsentPutWithKey(short key,
ShortToByteFunction function) |
|
byte |
getOrThrow(short key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function) |
|
MutableShortSet |
keySet() |
|
LazyShortIterable |
keysView() |
|
RichIterable<ShortBytePair> |
keyValuesView() |
|
static ShortByteHashMap |
newWithKeysValues(short key1,
byte value1) |
|
static ShortByteHashMap |
newWithKeysValues(short key1,
byte value1,
short key2,
byte value2) |
|
static ShortByteHashMap |
newWithKeysValues(short key1,
byte value1,
short key2,
byte value2,
short key3,
byte value3) |
|
static ShortByteHashMap |
newWithKeysValues(short key1,
byte value1,
short key2,
byte value2,
short key3,
byte value3,
short key4,
byte value4) |
|
void |
put(short key,
byte value) |
|
void |
putAll(ShortByteMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ShortByteHashMap |
reject(ShortBytePredicate predicate) |
|
void |
remove(short key) |
|
void |
removeKey(short key) |
|
byte |
removeKeyIfAbsent(short key,
byte value) |
|
ShortByteHashMap |
select(ShortBytePredicate predicate) |
|
ImmutableShortByteMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
byte |
updateValue(short key,
byte initialValueIfAbsent,
ByteToByteFunction function) |
|
MutableByteCollection |
values() |
|
ShortByteHashMap |
withKeysValues(short key1,
byte value1,
short key2,
byte value2) |
|
ShortByteHashMap |
withKeysValues(short key1,
byte value1,
short key2,
byte value2,
short key3,
byte value3) |
|
ShortByteHashMap |
withKeysValues(short key1,
byte value1,
short key2,
byte value2,
short key3,
byte value3,
short key4,
byte value4) |
|
ShortByteHashMap |
withKeyValue(short key1,
byte value1) |
|
ShortByteHashMap |
withoutAllKeys(ShortIterable keys) |
|
ShortByteHashMap |
withoutKey(short 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, toArrayallSatisfy, 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, tapcollect, reject, selectputPairappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic ShortByteHashMap()
public ShortByteHashMap(int initialCapacity)
public ShortByteHashMap(ShortByteMap map)
public static ShortByteHashMap newWithKeysValues(short key1, byte value1)
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2)
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
public boolean equals(java.lang.Object obj)
ShortByteMapMap.equals(Object).equals in interface ShortByteMapequals in class java.lang.Objectpublic int hashCode()
ShortByteMapMap.hashCode().hashCode in interface ShortByteMaphashCode 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 PrimitiveIterabletoString in interface ShortByteMaptoString in class AbstractByteIterableAbstractCollection.toString()public MutableByteIterator byteIterator()
ByteIterablebyteIterator in interface ByteIterablebyteIterator in interface MutableByteValuesMappublic <V> V injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function)
injectInto in interface ByteIterablepublic void clear()
clear in interface MutableByteValuesMapclear in interface MutableShortKeysMappublic void put(short key,
byte value)
put in interface MutableShortByteMappublic void putAll(ShortByteMap map)
putAll in interface MutableShortByteMappublic void removeKey(short key)
removeKey in interface MutableShortByteMapremoveKey in interface MutableShortKeysMappublic void remove(short key)
remove in interface MutableShortByteMappublic byte removeKeyIfAbsent(short key,
byte value)
removeKeyIfAbsent in interface MutableShortByteMappublic byte getIfAbsentPut(short key,
byte value)
getIfAbsentPut in interface MutableShortByteMappublic byte getIfAbsentPut(short key,
ByteFunction0 function)
getIfAbsentPut in interface MutableShortByteMappublic <P> byte getIfAbsentPutWith(short key,
ByteFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableShortByteMappublic byte getIfAbsentPutWithKey(short key,
ShortToByteFunction function)
getIfAbsentPutWithKey in interface MutableShortByteMappublic byte addToValue(short key,
byte toBeAdded)
addToValue in interface MutableShortByteMappublic byte updateValue(short key,
byte initialValueIfAbsent,
ByteToByteFunction function)
updateValue in interface MutableShortByteMappublic ShortByteHashMap withKeyValue(short key1, byte value1)
withKeyValue in interface MutableShortByteMappublic ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2)
public ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
public ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
public ShortByteHashMap withoutKey(short key)
withoutKey in interface MutableShortByteMappublic ShortByteHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys in interface MutableShortByteMappublic MutableShortByteMap asUnmodifiable()
asUnmodifiable in interface MutableShortByteMappublic MutableShortByteMap asSynchronized()
asSynchronized in interface MutableShortByteMappublic ImmutableShortByteMap toImmutable()
toImmutable in interface ShortByteMappublic byte get(short key)
get in interface ShortByteMappublic byte getIfAbsent(short key,
byte ifAbsent)
getIfAbsent in interface ShortByteMappublic byte getOrThrow(short key)
getOrThrow in interface ShortByteMappublic boolean containsKey(short key)
containsKey in interface ShortByteMapcontainsKey in interface ShortKeysMappublic void forEachKey(ShortProcedure procedure)
forEachKey in interface ShortByteMapforEachKey in interface ShortKeysMappublic void forEachKeyValue(ShortByteProcedure procedure)
forEachKeyValue in interface ShortByteMappublic LazyShortIterable keysView()
keysView in interface ShortByteMappublic RichIterable<ShortBytePair> keyValuesView()
keyValuesView in interface ShortByteMappublic MutableByteShortMap flipUniqueValues()
ShortByteMapflipUniqueValues in interface MutableShortByteMapflipUniqueValues in interface ShortByteMappublic ShortByteHashMap select(ShortBytePredicate predicate)
select in interface MutableShortByteMapselect in interface ShortByteMappublic ShortByteHashMap reject(ShortBytePredicate predicate)
reject in interface MutableShortByteMapreject in interface ShortByteMappublic 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 MutableShortSet keySet()
keySet in interface ShortByteMappublic MutableByteCollection values()
values in interface ByteValuesMapCopyright © 2004–2018. All rights reserved.