public static class Byte2ShortMaps.SynchronizedMap extends AbstractByte2ShortMap implements Byte2ShortMap
AbstractByte2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ShortMap.BuilderCache, Byte2ShortMap.Entry, Byte2ShortMap.FastEntrySet, Byte2ShortMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
short |
addTo(byte key,
short value)
A Helper method to add a primitives together.
|
void |
addToAll(Byte2ShortMap m)
A Helper method to bulk add primitives together.
|
ObjectSet<Byte2ShortMap.Entry> |
byte2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear()
Deprecated.
|
java.lang.Short |
compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
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 |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
Byte2ShortMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Byte,? super java.lang.Short> action)
Deprecated.
|
void |
forEach(ByteShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Short |
get(java.lang.Object key)
Deprecated.
|
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)
Deprecated.
|
ByteSet |
keySet() |
java.lang.Short |
merge(java.lang.Byte key,
java.lang.Short value,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
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
|
short |
put(byte key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Short |
put(java.lang.Byte key,
java.lang.Short value)
Deprecated.
|
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 |
putIfAbsent(byte key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Short |
putIfAbsent(java.lang.Byte key,
java.lang.Short value)
Deprecated.
|
short |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Short |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
short |
removeOrDefault(byte key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
replace(byte key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Short |
replace(java.lang.Byte key,
java.lang.Short value)
Deprecated.
|
boolean |
replace(byte key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Byte key,
java.lang.Short oldValue,
java.lang.Short newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
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
|
int |
size() |
short |
subFrom(byte key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(byte key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic short getDefaultReturnValue()
Byte2ShortMapgetDefaultReturnValue in interface Byte2ShortMapgetDefaultReturnValue in class AbstractByte2ShortMappublic AbstractByte2ShortMap setDefaultReturnValue(short v)
Byte2ShortMapsetDefaultReturnValue in interface Byte2ShortMapsetDefaultReturnValue in class AbstractByte2ShortMapv - value that should be the default return valuepublic short put(byte key,
short value)
Byte2ShortMapput in interface Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(byte key,
short value)
Byte2ShortMapputIfAbsent in interface Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Byte2ShortMap m)
Byte2ShortMapputAllIfAbsent in interface Byte2ShortMapputAllIfAbsent in class AbstractByte2ShortMapm - elements that should be added if not present.public short addTo(byte key,
short value)
Byte2ShortMapaddTo in interface Byte2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(byte key,
short value)
Byte2ShortMapByte2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Byte2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Byte2ShortMap m)
Byte2ShortMapaddToAll in interface Byte2ShortMapaddToAll in class AbstractByte2ShortMapm - the values that should be added/insertedpublic void putAll(Byte2ShortMap m)
Byte2ShortMapputAll in interface Byte2ShortMapputAll in class AbstractByte2ShortMapm - 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 AbstractByte2ShortMappublic void putAll(byte[] keys,
short[] values,
int offset,
int size)
Byte2ShortMapputAll in interface Byte2ShortMapputAll in class AbstractByte2ShortMapkeys - 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 boolean containsKey(byte key)
Byte2ShortMapcontainsKey in interface Byte2ShortMapcontainsKey in class AbstractByte2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Byte2ShortMapcontainsValue in interface Byte2ShortMapcontainsValue in class AbstractByte2ShortMapvalue - element that is searched forpublic short get(byte key)
Byte2ShortMapget in interface Byte2ShortFunctionget in interface Byte2ShortMapkey - the key that is searched forpublic short remove(byte key)
Byte2ShortMapremove in interface Byte2ShortMapkey - the element that should be removedpublic short removeOrDefault(byte key,
short defaultValue)
Byte2ShortMapremoveOrDefault in interface Byte2ShortMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
short value)
Byte2ShortMapremove in interface Byte2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
short oldValue,
short newValue)
Byte2ShortMapreplace in interface Byte2ShortMapreplace in class AbstractByte2ShortMapkey - 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 Byte2ShortMapreplace in class AbstractByte2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Byte2ShortMap m)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapreplaceShorts in class AbstractByte2ShortMapm - elements that should be replaced.public void replaceShorts(ByteShortUnaryOperator mappingFunction)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapreplaceShorts in class AbstractByte2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(byte key,
ByteShortUnaryOperator mappingFunction)
Byte2ShortMapcomputeShort in interface Byte2ShortMapcomputeShort in class AbstractByte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(byte key,
Byte2ShortFunction mappingFunction)
Byte2ShortMapcomputeShortIfAbsent in interface Byte2ShortMapcomputeShortIfAbsent in class AbstractByte2ShortMapkey - 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 Byte2ShortMapcomputeShortIfPresent in class AbstractByte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(byte key,
ShortSupplier valueProvider)
Byte2ShortMapsupplyShortIfAbsent in interface Byte2ShortMapsupplyShortIfAbsent in class AbstractByte2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(byte key,
short value,
ShortShortUnaryOperator mappingFunction)
Byte2ShortMapmergeShort in interface Byte2ShortMapmergeShort in class AbstractByte2ShortMapkey - 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 Byte2ShortMapmergeAllShort in class AbstractByte2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic short getOrDefault(byte key,
short defaultValue)
Byte2ShortMapgetOrDefault in interface Byte2ShortMapgetOrDefault in class AbstractByte2ShortMapkey - 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 Byte2ShortMapforEach in class AbstractByte2ShortMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Short>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public Byte2ShortMap copy()
Byte2ShortMapcopy in interface Byte2ShortMapcopy in class AbstractByte2ShortMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Short>keySet in interface Byte2ShortMapkeySet in class AbstractByte2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Short>values in interface Byte2ShortMapvalues in class AbstractByte2ShortMappublic ObjectSet<Byte2ShortMap.Entry> byte2ShortEntrySet()
Byte2ShortMapbyte2ShortEntrySet in interface Byte2ShortMap@Deprecated public 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 AbstractByte2ShortMap@Deprecated
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 Byte2ShortMapgetOrDefault in class AbstractByte2ShortMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Byte,java.lang.Short>containsValue in interface Byte2ShortMapcontainsValue in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Byte,java.lang.Short>containsKey in interface Byte2ShortMapcontainsKey in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Short put(java.lang.Byte key,
java.lang.Short value)
put in interface java.util.Map<java.lang.Byte,java.lang.Short>put in interface Byte2ShortMapput in class AbstractByte2ShortMap@Deprecated public java.lang.Short remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,java.lang.Short>remove in interface Byte2ShortMapremove in class AbstractByte2ShortMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>@Deprecated
public java.lang.Short putIfAbsent(java.lang.Byte key,
java.lang.Short value)
putIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Short>putIfAbsent in interface Byte2ShortMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Byte,java.lang.Short>remove in interface Byte2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Byte key,
java.lang.Short oldValue,
java.lang.Short newValue)
replace in interface java.util.Map<java.lang.Byte,java.lang.Short>replace in interface Byte2ShortMap@Deprecated
public java.lang.Short replace(java.lang.Byte key,
java.lang.Short value)
replace in interface java.util.Map<java.lang.Byte,java.lang.Short>replace in interface Byte2ShortMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Byte,java.lang.Short>replaceAll in interface Byte2ShortMap@Deprecated
public java.lang.Short compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
compute in interface java.util.Map<java.lang.Byte,java.lang.Short>compute in interface Byte2ShortMap@Deprecated
public java.lang.Short computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Short> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Short>computeIfAbsent in interface Byte2ShortMap@Deprecated
public java.lang.Short computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Byte,java.lang.Short>computeIfPresent in interface Byte2ShortMap@Deprecated
public java.lang.Short merge(java.lang.Byte key,
java.lang.Short value,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
merge in interface java.util.Map<java.lang.Byte,java.lang.Short>merge in interface Byte2ShortMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Byte,? super java.lang.Short> action)
forEach in interface java.util.Map<java.lang.Byte,java.lang.Short>forEach in interface Byte2ShortMap