public static class Short2ByteMaps.SynchronizedMap extends AbstractShort2ByteMap implements Short2ByteMap
AbstractShort2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ByteMap.BuilderCache, Short2ByteMap.Entry, Short2ByteMap.FastEntrySet, Short2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(short key,
byte value)
A Helper method to add a primitives together.
|
void |
addToAll(Short2ByteMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Byte |
compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
byte |
computeByte(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Byte |
computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
java.lang.Byte |
computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Short2ByteMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Byte> action)
Deprecated.
|
void |
forEach(ShortByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Byte |
get(java.lang.Object key)
Deprecated.
|
byte |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Byte |
getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
Deprecated.
|
byte |
getOrDefault(short key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
java.lang.Byte |
merge(java.lang.Short key,
java.lang.Byte value,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
void |
mergeAllByte(Short2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
put(java.lang.Short key,
java.lang.Byte value)
Deprecated.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> m) |
void |
putAll(short[] keys,
byte[] 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(Short2ByteMap m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Short2ByteMap m)
Type-Specific bulk put method put elements into the map if not present.
|
byte |
putIfAbsent(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
putIfAbsent(java.lang.Short key,
java.lang.Byte value)
Deprecated.
|
java.lang.Byte |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
byte |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(short key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
replace(short key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Byte |
replace(java.lang.Short key,
java.lang.Byte value)
Deprecated.
|
boolean |
replace(short key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Short key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
void |
replaceBytes(Short2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(ShortByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractShort2ByteMap |
setDefaultReturnValue(byte v)
Method to define the default return value if a requested key isn't present
|
ObjectSet<Short2ByteMap.Entry> |
short2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
byte |
subFrom(short key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(short key,
ByteSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ByteCollection |
values() |
entrySet, equals, hashCode, putAllapplyAsByte, builder, entrySet, put, put, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic byte getDefaultReturnValue()
Short2ByteMapgetDefaultReturnValue in interface Short2ByteMapgetDefaultReturnValue in class AbstractShort2ByteMappublic AbstractShort2ByteMap setDefaultReturnValue(byte v)
Short2ByteMapsetDefaultReturnValue in interface Short2ByteMapsetDefaultReturnValue in class AbstractShort2ByteMapv - value that should be the default return valuepublic byte put(short key,
byte value)
Short2ByteMapput in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(short key,
byte value)
Short2ByteMapputIfAbsent in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Short2ByteMap m)
Short2ByteMapputAllIfAbsent in interface Short2ByteMapputAllIfAbsent in class AbstractShort2ByteMapm - elements that should be added if not present.public byte addTo(short key,
byte value)
Short2ByteMapaddTo in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(short key,
byte value)
Short2ByteMapShort2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Short2ByteMap m)
Short2ByteMapaddToAll in interface Short2ByteMapaddToAll in class AbstractShort2ByteMapm - the values that should be added/insertedpublic void putAll(Short2ByteMap m)
Short2ByteMapputAll in interface Short2ByteMapputAll in class AbstractShort2ByteMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> m)
putAll in interface java.util.Map<java.lang.Short,java.lang.Byte>putAll in class AbstractShort2ByteMappublic void putAll(short[] keys,
byte[] values,
int offset,
int size)
Short2ByteMapputAll in interface Short2ByteMapputAll in class AbstractShort2ByteMapkeys - 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(short key)
Short2ByteMapcontainsKey in interface Short2ByteMapcontainsKey in class AbstractShort2ByteMapkey - element that is searched forpublic boolean containsValue(byte value)
Short2ByteMapcontainsValue in interface Short2ByteMapcontainsValue in class AbstractShort2ByteMapvalue - element that is searched forpublic byte get(short key)
Short2ByteMapget in interface Short2ByteMapkey - the key that is searched forpublic byte remove(short key)
Short2ByteMapremove in interface Short2ByteMapkey - the element that should be removedpublic byte removeOrDefault(short key,
byte defaultValue)
Short2ByteMapremoveOrDefault in interface Short2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
byte value)
Short2ByteMapremove in interface Short2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
byte oldValue,
byte newValue)
Short2ByteMapreplace in interface Short2ByteMapreplace in class AbstractShort2ByteMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(short key,
byte value)
Short2ByteMapreplace in interface Short2ByteMapreplace in class AbstractShort2ByteMapkey - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Short2ByteMap m)
Short2ByteMapreplaceBytes in interface Short2ByteMapreplaceBytes in class AbstractShort2ByteMapm - elements that should be replaced.public void replaceBytes(ShortByteUnaryOperator mappingFunction)
Short2ByteMapreplaceBytes in interface Short2ByteMapreplaceBytes in class AbstractShort2ByteMapmappingFunction - operation to replace all valuespublic byte computeByte(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByte in interface Short2ByteMapcomputeByte in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
Short2ByteMapcomputeByteIfAbsent in interface Short2ByteMapcomputeByteIfAbsent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByteIfPresent in interface Short2ByteMapcomputeByteIfPresent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(short key,
ByteSupplier valueProvider)
Short2ByteMapsupplyByteIfAbsent in interface Short2ByteMapsupplyByteIfAbsent in class AbstractShort2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeByte in interface Short2ByteMapmergeByte in class AbstractShort2ByteMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllByte(Short2ByteMap m, ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeAllByte in interface Short2ByteMapmergeAllByte in class AbstractShort2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic byte getOrDefault(short key,
byte defaultValue)
Short2ByteMapgetOrDefault in interface Short2ByteMapgetOrDefault in class AbstractShort2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ShortByteConsumer action)
Short2ByteMapforEach in interface Short2ByteMapforEach in class AbstractShort2ByteMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Byte>size in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>public Short2ByteMap copy()
Short2ByteMapcopy in interface Short2ByteMapcopy in class AbstractShort2ByteMappublic ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Byte>keySet in interface Short2ByteMapkeySet in class AbstractShort2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Byte>values in interface Short2ByteMapvalues in class AbstractShort2ByteMappublic ObjectSet<Short2ByteMap.Entry> short2ByteEntrySet()
Short2ByteMapshort2ByteEntrySet in interface Short2ByteMap@Deprecated public java.lang.Byte get(java.lang.Object key)
get in interface java.util.Map<java.lang.Short,java.lang.Byte>get in interface Short2ByteMapget in class AbstractShort2ByteMap@Deprecated
public java.lang.Byte getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
getOrDefault in interface java.util.Map<java.lang.Short,java.lang.Byte>getOrDefault in interface Short2ByteMapgetOrDefault in class AbstractShort2ByteMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Short,java.lang.Byte>containsValue in interface Short2ByteMapcontainsValue in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Short,java.lang.Byte>containsKey in interface Short2ByteMapcontainsKey in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Byte put(java.lang.Short key,
java.lang.Byte value)
put in interface java.util.Map<java.lang.Short,java.lang.Byte>put in interface Short2ByteMapput in class AbstractShort2ByteMap@Deprecated public java.lang.Byte remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Short,java.lang.Byte>remove in interface Short2ByteMapremove in class AbstractShort2ByteMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>@Deprecated
public java.lang.Byte putIfAbsent(java.lang.Short key,
java.lang.Byte value)
putIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Byte>putIfAbsent in interface Short2ByteMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Short,java.lang.Byte>remove in interface Short2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Short key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
replace in interface java.util.Map<java.lang.Short,java.lang.Byte>replace in interface Short2ByteMap@Deprecated
public java.lang.Byte replace(java.lang.Short key,
java.lang.Byte value)
replace in interface java.util.Map<java.lang.Short,java.lang.Byte>replace in interface Short2ByteMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Short,java.lang.Byte>replaceAll in interface Short2ByteMap@Deprecated
public java.lang.Byte compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
compute in interface java.util.Map<java.lang.Short,java.lang.Byte>compute in interface Short2ByteMap@Deprecated
public java.lang.Byte computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Byte> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Byte>computeIfAbsent in interface Short2ByteMap@Deprecated
public java.lang.Byte computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Short,java.lang.Byte>computeIfPresent in interface Short2ByteMap@Deprecated
public java.lang.Byte merge(java.lang.Short key,
java.lang.Byte value,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
merge in interface java.util.Map<java.lang.Short,java.lang.Byte>merge in interface Short2ByteMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Byte> action)
forEach in interface java.util.Map<java.lang.Short,java.lang.Byte>forEach in interface Short2ByteMap