public static class Long2ByteMaps.SynchronizedMap extends AbstractLong2ByteMap implements Long2ByteMap
AbstractLong2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ByteMap.BuilderCache, Long2ByteMap.Entry, Long2ByteMap.FastEntrySet, Long2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(long key,
byte value)
A Helper method to add a primitives together.
|
void |
addToAll(Long2ByteMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Byte |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
byte |
computeByte(long key,
LongByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(long key,
Long2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(long key,
LongByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Byte |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
java.lang.Byte |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
boolean |
containsKey(long 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.
|
Long2ByteMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Byte> action)
Deprecated.
|
void |
forEach(LongByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
byte |
get(long 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(long 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.
|
LongSet |
keySet() |
ObjectSet<Long2ByteMap.Entry> |
long2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
java.lang.Byte |
merge(java.lang.Long 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(Long2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(long key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(long key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
put(java.lang.Long key,
java.lang.Byte value)
Deprecated.
|
void |
putAll(long[] 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(Long2ByteMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Byte> m) |
void |
putAllIfAbsent(Long2ByteMap m)
Type-Specific bulk put method put elements into the map if not present.
|
byte |
putIfAbsent(long key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Byte |
putIfAbsent(java.lang.Long key,
java.lang.Byte value)
Deprecated.
|
byte |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long 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(long key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
replace(long key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Byte |
replace(java.lang.Long key,
java.lang.Byte value)
Deprecated.
|
boolean |
replace(long key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
void |
replaceBytes(Long2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(LongByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2ByteMap |
setDefaultReturnValue(byte v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
byte |
subFrom(long key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(long 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()
Long2ByteMapgetDefaultReturnValue in interface Long2ByteMapgetDefaultReturnValue in class AbstractLong2ByteMappublic AbstractLong2ByteMap setDefaultReturnValue(byte v)
Long2ByteMapsetDefaultReturnValue in interface Long2ByteMapsetDefaultReturnValue in class AbstractLong2ByteMapv - value that should be the default return valuepublic byte put(long key,
byte value)
Long2ByteMapput in interface Long2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(long key,
byte value)
Long2ByteMapputIfAbsent in interface Long2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2ByteMap m)
Long2ByteMapputAllIfAbsent in interface Long2ByteMapputAllIfAbsent in class AbstractLong2ByteMapm - elements that should be added if not present.public byte addTo(long key,
byte value)
Long2ByteMapaddTo in interface Long2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(long key,
byte value)
Long2ByteMapLong2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Long2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Long2ByteMap m)
Long2ByteMapaddToAll in interface Long2ByteMapaddToAll in class AbstractLong2ByteMapm - the values that should be added/insertedpublic void putAll(Long2ByteMap m)
Long2ByteMapputAll in interface Long2ByteMapputAll in class AbstractLong2ByteMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Byte> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Byte>putAll in class AbstractLong2ByteMappublic void putAll(long[] keys,
byte[] values,
int offset,
int size)
Long2ByteMapputAll in interface Long2ByteMapputAll in class AbstractLong2ByteMapkeys - 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(long key)
Long2ByteMapcontainsKey in interface Long2ByteMapcontainsKey in class AbstractLong2ByteMapkey - element that is searched forpublic boolean containsValue(byte value)
Long2ByteMapcontainsValue in interface Long2ByteMapcontainsValue in class AbstractLong2ByteMapvalue - element that is searched forpublic byte get(long key)
Long2ByteMapget in interface Long2ByteMapkey - the key that is searched forpublic byte remove(long key)
Long2ByteMapremove in interface Long2ByteMapkey - the element that should be removedpublic byte removeOrDefault(long key,
byte defaultValue)
Long2ByteMapremoveOrDefault in interface Long2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
byte value)
Long2ByteMapremove in interface Long2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
byte oldValue,
byte newValue)
Long2ByteMapreplace in interface Long2ByteMapreplace in class AbstractLong2ByteMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(long key,
byte value)
Long2ByteMapreplace in interface Long2ByteMapreplace in class AbstractLong2ByteMapkey - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Long2ByteMap m)
Long2ByteMapreplaceBytes in interface Long2ByteMapreplaceBytes in class AbstractLong2ByteMapm - elements that should be replaced.public void replaceBytes(LongByteUnaryOperator mappingFunction)
Long2ByteMapreplaceBytes in interface Long2ByteMapreplaceBytes in class AbstractLong2ByteMapmappingFunction - operation to replace all valuespublic byte computeByte(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByte in interface Long2ByteMapcomputeByte in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(long key,
Long2ByteFunction mappingFunction)
Long2ByteMapcomputeByteIfAbsent in interface Long2ByteMapcomputeByteIfAbsent in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByteIfPresent in interface Long2ByteMapcomputeByteIfPresent in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(long key,
ByteSupplier valueProvider)
Long2ByteMapsupplyByteIfAbsent in interface Long2ByteMapsupplyByteIfAbsent in class AbstractLong2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(long key,
byte value,
ByteByteUnaryOperator mappingFunction)
Long2ByteMapmergeByte in interface Long2ByteMapmergeByte in class AbstractLong2ByteMapkey - 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(Long2ByteMap m, ByteByteUnaryOperator mappingFunction)
Long2ByteMapmergeAllByte in interface Long2ByteMapmergeAllByte in class AbstractLong2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic byte getOrDefault(long key,
byte defaultValue)
Long2ByteMapgetOrDefault in interface Long2ByteMapgetOrDefault in class AbstractLong2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongByteConsumer action)
Long2ByteMapforEach in interface Long2ByteMapforEach in class AbstractLong2ByteMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Byte>size in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>public Long2ByteMap copy()
Long2ByteMapcopy in interface Long2ByteMapcopy in class AbstractLong2ByteMappublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Byte>keySet in interface Long2ByteMapkeySet in class AbstractLong2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Byte>values in interface Long2ByteMapvalues in class AbstractLong2ByteMappublic ObjectSet<Long2ByteMap.Entry> long2ByteEntrySet()
Long2ByteMaplong2ByteEntrySet in interface Long2ByteMap@Deprecated public java.lang.Byte get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Byte>get in interface Long2ByteMapget in class AbstractLong2ByteMap@Deprecated
public java.lang.Byte getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Byte>getOrDefault in interface Long2ByteMapgetOrDefault in class AbstractLong2ByteMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Byte>containsValue in interface Long2ByteMapcontainsValue in class java.util.AbstractMap<java.lang.Long,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.Long,java.lang.Byte>containsKey in interface Long2ByteMapcontainsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Byte put(java.lang.Long key,
java.lang.Byte value)
put in interface java.util.Map<java.lang.Long,java.lang.Byte>put in interface Long2ByteMapput in class AbstractLong2ByteMap@Deprecated public java.lang.Byte remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,java.lang.Byte>remove in interface Long2ByteMapremove in class AbstractLong2ByteMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>@Deprecated
public java.lang.Byte putIfAbsent(java.lang.Long key,
java.lang.Byte value)
putIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Byte>putIfAbsent in interface Long2ByteMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,java.lang.Byte>remove in interface Long2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Long key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
replace in interface java.util.Map<java.lang.Long,java.lang.Byte>replace in interface Long2ByteMap@Deprecated
public java.lang.Byte replace(java.lang.Long key,
java.lang.Byte value)
replace in interface java.util.Map<java.lang.Long,java.lang.Byte>replace in interface Long2ByteMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,java.lang.Byte>replaceAll in interface Long2ByteMap@Deprecated
public java.lang.Byte compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
compute in interface java.util.Map<java.lang.Long,java.lang.Byte>compute in interface Long2ByteMap@Deprecated
public java.lang.Byte computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Byte> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Byte>computeIfAbsent in interface Long2ByteMap@Deprecated
public java.lang.Byte computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,java.lang.Byte>computeIfPresent in interface Long2ByteMap@Deprecated
public java.lang.Byte merge(java.lang.Long 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.Long,java.lang.Byte>merge in interface Long2ByteMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Byte> action)
forEach in interface java.util.Map<java.lang.Long,java.lang.Byte>forEach in interface Long2ByteMap