public static class Byte2ByteMaps.SynchronizedMap extends AbstractByte2ByteMap implements Byte2ByteMap
AbstractByte2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ByteMap.BuilderCache, Byte2ByteMap.Entry, Byte2ByteMap.FastEntrySet, Byte2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(byte key,
byte value)
A Helper method to add a primitives together.
|
void |
addToAll(Byte2ByteMap m)
A Helper method to bulk add primitives together.
|
ObjectSet<Byte2ByteMap.Entry> |
byte2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear()
Deprecated.
|
java.lang.Byte |
compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
byte |
computeByte(byte key,
ByteByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(byte key,
ByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(byte key,
ByteByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Byte |
computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
java.lang.Byte |
computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Byte2ByteMap |
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.Byte> action)
Deprecated.
|
void |
forEach(ByteByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
byte |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Byte |
get(java.lang.Object key)
Deprecated.
|
byte |
getDefaultReturnValue()
Method to see what the default return value is.
|
byte |
getOrDefault(byte key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Byte |
getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
Deprecated.
|
ByteSet |
keySet() |
java.lang.Byte |
merge(java.lang.Byte 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(Byte2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(byte key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(byte key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
put(java.lang.Byte key,
java.lang.Byte value)
Deprecated.
|
void |
putAll(byte[] 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(Byte2ByteMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> m) |
void |
putAllIfAbsent(Byte2ByteMap m)
Type-Specific bulk put method put elements into the map if not present.
|
byte |
putIfAbsent(byte key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
putIfAbsent(java.lang.Byte key,
java.lang.Byte value)
Deprecated.
|
byte |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Byte |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
byte |
removeOrDefault(byte key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
replace(byte key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Byte |
replace(java.lang.Byte key,
java.lang.Byte value)
Deprecated.
|
boolean |
replace(byte key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Byte key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
void |
replaceBytes(Byte2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(ByteByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractByte2ByteMap |
setDefaultReturnValue(byte v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
byte |
subFrom(byte key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(byte 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, unmodifiableandThen, compose, identitypublic byte getDefaultReturnValue()
Byte2ByteMapgetDefaultReturnValue in interface Byte2ByteMapgetDefaultReturnValue in class AbstractByte2ByteMappublic AbstractByte2ByteMap setDefaultReturnValue(byte v)
Byte2ByteMapsetDefaultReturnValue in interface Byte2ByteMapsetDefaultReturnValue in class AbstractByte2ByteMapv - value that should be the default return valuepublic byte put(byte key,
byte value)
Byte2ByteMapput in interface Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(byte key,
byte value)
Byte2ByteMapputIfAbsent in interface Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Byte2ByteMap m)
Byte2ByteMapputAllIfAbsent in interface Byte2ByteMapputAllIfAbsent in class AbstractByte2ByteMapm - elements that should be added if not present.public byte addTo(byte key,
byte value)
Byte2ByteMapaddTo in interface Byte2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(byte key,
byte value)
Byte2ByteMapByte2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Byte2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Byte2ByteMap m)
Byte2ByteMapaddToAll in interface Byte2ByteMapaddToAll in class AbstractByte2ByteMapm - the values that should be added/insertedpublic void putAll(Byte2ByteMap m)
Byte2ByteMapputAll in interface Byte2ByteMapputAll in class AbstractByte2ByteMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> m)
putAll in interface java.util.Map<java.lang.Byte,java.lang.Byte>putAll in class AbstractByte2ByteMappublic void putAll(byte[] keys,
byte[] values,
int offset,
int size)
Byte2ByteMapputAll in interface Byte2ByteMapputAll in class AbstractByte2ByteMapkeys - 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)
Byte2ByteMapcontainsKey in interface Byte2ByteMapcontainsKey in class AbstractByte2ByteMapkey - element that is searched forpublic boolean containsValue(byte value)
Byte2ByteMapcontainsValue in interface Byte2ByteMapcontainsValue in class AbstractByte2ByteMapvalue - element that is searched forpublic byte get(byte key)
Byte2ByteMapget in interface Byte2ByteMapkey - the key that is searched forpublic byte remove(byte key)
Byte2ByteMapremove in interface Byte2ByteMapkey - the element that should be removedpublic byte removeOrDefault(byte key,
byte defaultValue)
Byte2ByteMapremoveOrDefault in interface Byte2ByteMapkey - 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,
byte value)
Byte2ByteMapremove in interface Byte2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
byte oldValue,
byte newValue)
Byte2ByteMapreplace in interface Byte2ByteMapreplace in class AbstractByte2ByteMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(byte key,
byte value)
Byte2ByteMapreplace in interface Byte2ByteMapreplace in class AbstractByte2ByteMapkey - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Byte2ByteMap m)
Byte2ByteMapreplaceBytes in interface Byte2ByteMapreplaceBytes in class AbstractByte2ByteMapm - elements that should be replaced.public void replaceBytes(ByteByteUnaryOperator mappingFunction)
Byte2ByteMapreplaceBytes in interface Byte2ByteMapreplaceBytes in class AbstractByte2ByteMapmappingFunction - operation to replace all valuespublic byte computeByte(byte key,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByte in interface Byte2ByteMapcomputeByte in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(byte key,
ByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByteIfAbsent in interface Byte2ByteMapcomputeByteIfAbsent in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(byte key,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByteIfPresent in interface Byte2ByteMapcomputeByteIfPresent in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(byte key,
ByteSupplier valueProvider)
Byte2ByteMapsupplyByteIfAbsent in interface Byte2ByteMapsupplyByteIfAbsent in class AbstractByte2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(byte key,
byte value,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapmergeByte in interface Byte2ByteMapmergeByte in class AbstractByte2ByteMapkey - 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(Byte2ByteMap m, ByteByteUnaryOperator mappingFunction)
Byte2ByteMapmergeAllByte in interface Byte2ByteMapmergeAllByte in class AbstractByte2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic byte getOrDefault(byte key,
byte defaultValue)
Byte2ByteMapgetOrDefault in interface Byte2ByteMapgetOrDefault in class AbstractByte2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ByteByteConsumer action)
Byte2ByteMapforEach in interface Byte2ByteMapforEach in class AbstractByte2ByteMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Byte>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Byte>public Byte2ByteMap copy()
Byte2ByteMapcopy in interface Byte2ByteMapcopy in class AbstractByte2ByteMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Byte>keySet in interface Byte2ByteMapkeySet in class AbstractByte2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Byte>values in interface Byte2ByteMapvalues in class AbstractByte2ByteMappublic ObjectSet<Byte2ByteMap.Entry> byte2ByteEntrySet()
Byte2ByteMapbyte2ByteEntrySet in interface Byte2ByteMap@Deprecated public java.lang.Byte get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Byte>get in interface Byte2ByteMapget in class AbstractByte2ByteMap@Deprecated
public java.lang.Byte getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
getOrDefault in interface java.util.Map<java.lang.Byte,java.lang.Byte>getOrDefault in interface Byte2ByteMapgetOrDefault in class AbstractByte2ByteMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Byte,java.lang.Byte>containsValue in interface Byte2ByteMapcontainsValue in class java.util.AbstractMap<java.lang.Byte,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.Byte,java.lang.Byte>containsKey in interface Byte2ByteMapcontainsKey in class java.util.AbstractMap<java.lang.Byte,java.lang.Byte>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Byte put(java.lang.Byte key,
java.lang.Byte value)
put in interface java.util.Map<java.lang.Byte,java.lang.Byte>put in interface Byte2ByteMapput in class AbstractByte2ByteMap@Deprecated public java.lang.Byte remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,java.lang.Byte>remove in interface Byte2ByteMapremove in class AbstractByte2ByteMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Byte>@Deprecated
public java.lang.Byte putIfAbsent(java.lang.Byte key,
java.lang.Byte value)
putIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Byte>putIfAbsent in interface Byte2ByteMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Byte,java.lang.Byte>remove in interface Byte2ByteMapkey - 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.Byte oldValue,
java.lang.Byte newValue)
replace in interface java.util.Map<java.lang.Byte,java.lang.Byte>replace in interface Byte2ByteMap@Deprecated
public java.lang.Byte replace(java.lang.Byte key,
java.lang.Byte value)
replace in interface java.util.Map<java.lang.Byte,java.lang.Byte>replace in interface Byte2ByteMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Byte,java.lang.Byte>replaceAll in interface Byte2ByteMap@Deprecated
public java.lang.Byte compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
compute in interface java.util.Map<java.lang.Byte,java.lang.Byte>compute in interface Byte2ByteMap@Deprecated
public java.lang.Byte computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Byte>computeIfAbsent in interface Byte2ByteMap@Deprecated
public java.lang.Byte computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Byte,java.lang.Byte>computeIfPresent in interface Byte2ByteMap@Deprecated
public java.lang.Byte merge(java.lang.Byte 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.Byte,java.lang.Byte>merge in interface Byte2ByteMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Byte,? super java.lang.Byte> action)
forEach in interface java.util.Map<java.lang.Byte,java.lang.Byte>forEach in interface Byte2ByteMap