public abstract class AbstractByte2ShortMap extends java.util.AbstractMap<java.lang.Byte,java.lang.Short> implements Byte2ShortMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractByte2ShortMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ShortMap.Entry, Byte2ShortMap.FastEntrySet| Constructor and Description |
|---|
AbstractByte2ShortMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Byte2ShortMap m)
A Helper method to bulk add primitives together.
|
short |
computeShort(byte key,
ByteShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(byte key,
Byte2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(byte key,
ByteShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Byte,java.lang.Short>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ByteShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Short |
get(java.lang.Object key) |
short |
getDefaultReturnValue()
Method to see what the default return value is.
|
short |
getOrDefault(byte key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Short |
getOrDefault(java.lang.Object key,
java.lang.Short defaultValue) |
int |
hashCode() |
ByteSet |
keySet() |
void |
mergeAllShort(Byte2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(byte key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
putAll(byte[] keys,
short[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Byte2ShortMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Short> m) |
void |
putAllIfAbsent(Byte2ShortMap m)
Type-Specific bulk put method put elements into the map if not present.
|
short |
replace(byte key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceShorts(Byte2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(ByteShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractByte2ShortMap |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
ShortCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, byte2ShortEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getShort, merge, put, put, putAll, putIfAbsent, putIfAbsent, remByte, remByteOrDefault, remove, remove, remove, replace, replace, replaceAllpublic short getDefaultReturnValue()
Byte2ShortMapgetDefaultReturnValue in interface Byte2ShortMappublic AbstractByte2ShortMap setDefaultReturnValue(short v)
Byte2ShortMapsetDefaultReturnValue in interface Byte2ShortMapv - value that should be the default return valuepublic void addToAll(Byte2ShortMap m)
Byte2ShortMapaddToAll in interface Byte2ShortMapm - the values that should be added/insertedpublic void putAll(Byte2ShortMap m)
Byte2ShortMapputAll in interface Byte2ShortMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Short> m)
putAll in interface java.util.Map<java.lang.Byte,java.lang.Short>putAll in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public void putAll(byte[] keys,
short[] values,
int offset,
int size)
Byte2ShortMapputAll in interface Byte2ShortMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAllIfAbsent(Byte2ShortMap m)
Byte2ShortMapputAllIfAbsent in interface Byte2ShortMapm - elements that should be added if not present.public boolean containsKey(byte key)
Byte2ShortMapcontainsKey in interface Byte2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Byte2ShortMapcontainsValue in interface Byte2ShortMapvalue - element that is searched forpublic boolean replace(byte key,
short oldValue,
short newValue)
Byte2ShortMapreplace in interface Byte2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(byte key,
short value)
Byte2ShortMapreplace in interface Byte2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Byte2ShortMap m)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapm - elements that should be replaced.public void replaceShorts(ByteShortUnaryOperator mappingFunction)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(byte key,
ByteShortUnaryOperator mappingFunction)
Byte2ShortMapcomputeShort in interface Byte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(byte key,
Byte2ShortFunction mappingFunction)
Byte2ShortMapcomputeShortIfAbsent in interface Byte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(byte key,
ByteShortUnaryOperator mappingFunction)
Byte2ShortMapcomputeShortIfPresent in interface Byte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(byte key,
short value,
ShortShortUnaryOperator mappingFunction)
Byte2ShortMapmergeShort in interface Byte2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Byte2ShortMap m, ShortShortUnaryOperator mappingFunction)
Byte2ShortMapmergeAllShort in interface Byte2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Short get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Short>get in interface Byte2ShortMapget in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<java.lang.Byte,java.lang.Short>getOrDefault in interface Byte2ShortMappublic short getOrDefault(byte key,
short defaultValue)
Byte2ShortMapgetOrDefault in interface Byte2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ByteShortConsumer action)
Byte2ShortMapforEach in interface Byte2ShortMapaction - processor of the values that are iterator overpublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Short>keySet in interface Byte2ShortMapkeySet in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public ShortCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Short>values in interface Byte2ShortMapvalues in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public ObjectSet<java.util.Map.Entry<java.lang.Byte,java.lang.Short>> entrySet()
entrySet in interface java.util.Map<java.lang.Byte,java.lang.Short>entrySet in interface Byte2ShortMapentrySet in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Byte,java.lang.Short>equals in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public int hashCode()
hashCode in interface java.util.Map<java.lang.Byte,java.lang.Short>hashCode in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>