public class ShortByteHashMap extends AbstractMutableByteValuesMap implements com.gs.collections.api.map.primitive.MutableShortByteMap, java.io.Externalizable, MutableShortKeysMap
AbstractMutableByteValuesMap.AbstractByteValuesCollection, AbstractMutableByteValuesMap.SentinelValues| Constructor and Description |
|---|
ShortByteHashMap() |
ShortByteHashMap(int initialCapacity) |
ShortByteHashMap(com.gs.collections.api.map.primitive.ShortByteMap map) |
| Modifier and Type | Method and Description |
|---|---|
byte |
addToValue(short key,
byte toBeAdded) |
com.gs.collections.api.map.primitive.MutableShortByteMap |
asSynchronized() |
com.gs.collections.api.map.primitive.MutableShortByteMap |
asUnmodifiable() |
com.gs.collections.api.iterator.MutableByteIterator |
byteIterator() |
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). |
void |
forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortByteProcedure procedure) |
byte |
get(short key) |
protected byte |
getEmptyValue() |
byte |
getIfAbsent(short key,
byte ifAbsent) |
byte |
getIfAbsentPut(short key,
byte value) |
byte |
getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.ByteFunction0 function) |
<P> byte |
getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.ByteFunction<? super P> function,
P parameter) |
byte |
getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToByteFunction function) |
protected int |
getOccupiedWithData() |
byte |
getOrThrow(short key) |
protected AbstractMutableByteValuesMap.SentinelValues |
getSentinelValues() |
protected int |
getTableSize() |
protected byte |
getValueAtIndex(int index) |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectByteToObjectFunction<? super V,? extends V> function) |
protected boolean |
isNonSentinelAtIndex(int index) |
com.gs.collections.api.set.primitive.MutableShortSet |
keySet() |
com.gs.collections.api.LazyShortIterable |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.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(com.gs.collections.api.map.primitive.ShortByteMap map) |
void |
readExternal(java.io.ObjectInput in) |
ShortByteHashMap |
reject(com.gs.collections.api.block.predicate.primitive.ShortBytePredicate predicate) |
void |
remove(short key) |
void |
removeKey(short key) |
byte |
removeKeyIfAbsent(short key,
byte value) |
ShortByteHashMap |
select(com.gs.collections.api.block.predicate.primitive.ShortBytePredicate predicate) |
protected void |
setSentinelValuesNull() |
com.gs.collections.api.map.primitive.ImmutableShortByteMap |
toImmutable() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
byte |
updateValue(short key,
byte initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.ByteToByteFunction function) |
com.gs.collections.api.collection.primitive.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(com.gs.collections.api.ShortIterable keys) |
ShortByteHashMap |
withoutKey(short key) |
void |
writeExternal(java.io.ObjectOutput out) |
addEmptyKeyValue, addRemovedKeyValue, allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, removeEmptyKey, removeRemovedKey, select, size, sum, toArrayappendString, appendString, asLazy, average, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListclone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, reject, selectcontainsValue, forEachValueallSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic ShortByteHashMap()
public ShortByteHashMap(int initialCapacity)
public ShortByteHashMap(com.gs.collections.api.map.primitive.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)
protected int getOccupiedWithData()
getOccupiedWithData in class AbstractMutableByteValuesMapprotected AbstractMutableByteValuesMap.SentinelValues getSentinelValues()
getSentinelValues in class AbstractMutableByteValuesMapprotected void setSentinelValuesNull()
setSentinelValuesNull in class AbstractMutableByteValuesMapprotected byte getEmptyValue()
getEmptyValue in class AbstractMutableByteValuesMapprotected int getTableSize()
getTableSize in class AbstractMutableByteValuesMapprotected byte getValueAtIndex(int index)
getValueAtIndex in class AbstractMutableByteValuesMappublic boolean equals(java.lang.Object obj)
com.gs.collections.api.map.primitive.ShortByteMapMap.equals(Object).equals in interface com.gs.collections.api.map.primitive.ShortByteMapequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.map.primitive.ShortByteMapMap.hashCode().hashCode in interface com.gs.collections.api.map.primitive.ShortByteMaphashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.map.primitive.ShortByteMaptoString in interface com.gs.collections.api.PrimitiveIterabletoString in class AbstractByteIterablepublic com.gs.collections.api.iterator.MutableByteIterator byteIterator()
byteIterator in interface com.gs.collections.api.ByteIterablebyteIterator in interface com.gs.collections.api.map.primitive.MutableByteValuesMappublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectByteToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.ByteIterablepublic void clear()
clear in interface com.gs.collections.api.map.primitive.MutableByteValuesMapclear in interface MutableShortKeysMappublic void put(short key,
byte value)
put in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic void putAll(com.gs.collections.api.map.primitive.ShortByteMap map)
putAll in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic void removeKey(short key)
removeKey in interface com.gs.collections.api.map.primitive.MutableShortByteMapremoveKey in interface MutableShortKeysMappublic void remove(short key)
remove in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte removeKeyIfAbsent(short key,
byte value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte getIfAbsentPut(short key,
byte value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.ByteFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic <P> byte getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.ByteFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToByteFunction function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte addToValue(short key,
byte toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic byte updateValue(short key,
byte initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.ByteToByteFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic ShortByteHashMap withKeyValue(short key1, byte value1)
withKeyValue in interface com.gs.collections.api.map.primitive.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 com.gs.collections.api.map.primitive.MutableShortByteMappublic ShortByteHashMap withoutAllKeys(com.gs.collections.api.ShortIterable keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic com.gs.collections.api.map.primitive.MutableShortByteMap asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic com.gs.collections.api.map.primitive.MutableShortByteMap asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableShortByteMappublic com.gs.collections.api.map.primitive.ImmutableShortByteMap toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.ShortByteMappublic byte get(short key)
get in interface com.gs.collections.api.map.primitive.ShortByteMappublic byte getIfAbsent(short key,
byte ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.ShortByteMappublic byte getOrThrow(short key)
getOrThrow in interface com.gs.collections.api.map.primitive.ShortByteMappublic boolean containsKey(short key)
containsKey in interface com.gs.collections.api.map.primitive.ShortByteMapcontainsKey in interface ShortKeysMappublic void forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure)
forEachKey in interface com.gs.collections.api.map.primitive.ShortByteMapforEachKey in interface ShortKeysMappublic void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortByteProcedure procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.ShortByteMappublic com.gs.collections.api.LazyShortIterable keysView()
keysView in interface com.gs.collections.api.map.primitive.ShortByteMappublic com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ShortBytePair> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.ShortByteMappublic ShortByteHashMap select(com.gs.collections.api.block.predicate.primitive.ShortBytePredicate predicate)
select in interface com.gs.collections.api.map.primitive.MutableShortByteMapselect in interface com.gs.collections.api.map.primitive.ShortByteMappublic ShortByteHashMap reject(com.gs.collections.api.block.predicate.primitive.ShortBytePredicate predicate)
reject in interface com.gs.collections.api.map.primitive.MutableShortByteMapreject in interface com.gs.collections.api.map.primitive.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()
protected boolean isNonSentinelAtIndex(int index)
isNonSentinelAtIndex in class AbstractMutableByteValuesMappublic com.gs.collections.api.set.primitive.MutableShortSet keySet()
keySet in interface com.gs.collections.api.map.primitive.ShortByteMappublic com.gs.collections.api.collection.primitive.MutableByteCollection values()
values in interface com.gs.collections.api.map.primitive.ByteValuesMap