public abstract class AbstractLong2ByteMap extends java.util.AbstractMap<java.lang.Long,java.lang.Byte> implements Long2ByteMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLong2ByteMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ByteMap.BuilderCache, Long2ByteMap.Entry, Long2ByteMap.FastEntrySet, Long2ByteMap.MapBuilder| Constructor and Description |
|---|
AbstractLong2ByteMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Long2ByteMap m)
A Helper method to bulk add primitives together.
|
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
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
Long2ByteMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Byte>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(LongByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Byte |
get(java.lang.Object key) |
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) |
int |
hashCode() |
LongSet |
keySet() |
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
|
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(java.lang.Long[] keys,
java.lang.Byte[] values,
int offset,
int size)
Type Specific Object 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.
|
java.lang.Byte |
remove(java.lang.Object key) |
byte |
replace(long key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
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
|
byte |
supplyByteIfAbsent(long key,
ByteSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ByteCollection |
values() |
clear, containsKey, containsValue, isEmpty, size, toStringaddTo, applyAsByte, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, long2ByteEntrySet, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic byte getDefaultReturnValue()
Long2ByteMapgetDefaultReturnValue in interface Long2ByteMappublic AbstractLong2ByteMap setDefaultReturnValue(byte v)
Long2ByteMapsetDefaultReturnValue in interface Long2ByteMapv - value that should be the default return valuepublic Long2ByteMap copy()
Long2ByteMapcopy in interface Long2ByteMap@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 java.util.AbstractMap<java.lang.Long,java.lang.Byte>public void addToAll(Long2ByteMap m)
Long2ByteMapaddToAll in interface Long2ByteMapm - the values that should be added/insertedpublic void putAll(Long2ByteMap m)
Long2ByteMapputAll in interface Long2ByteMapm - 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 java.util.AbstractMap<java.lang.Long,java.lang.Byte>public void putAll(long[] keys,
byte[] values,
int offset,
int size)
Long2ByteMapputAll in interface Long2ByteMapkeys - 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 putAll(java.lang.Long[] keys,
java.lang.Byte[] values,
int offset,
int size)
Long2ByteMapputAll in interface Long2ByteMapkeys - 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(Long2ByteMap m)
Long2ByteMapputAllIfAbsent in interface Long2ByteMapm - elements that should be added if not present.public boolean containsKey(long key)
Long2ByteMapcontainsKey in interface Long2ByteMapkey - element that is searched forpublic boolean containsValue(byte value)
Long2ByteMapcontainsValue in interface Long2ByteMapvalue - element that is searched forpublic boolean replace(long key,
byte oldValue,
byte newValue)
Long2ByteMapreplace in interface Long2ByteMapkey - 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 Long2ByteMapkey - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Long2ByteMap m)
Long2ByteMapreplaceBytes in interface Long2ByteMapm - elements that should be replaced.public void replaceBytes(LongByteUnaryOperator mappingFunction)
Long2ByteMapreplaceBytes in interface Long2ByteMapmappingFunction - operation to replace all valuespublic byte computeByte(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByte in interface Long2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(long key,
Long2ByteFunction mappingFunction)
Long2ByteMapcomputeByteIfAbsent in interface Long2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte supplyByteIfAbsent(long key,
ByteSupplier valueProvider)
Long2ByteMapsupplyByteIfAbsent in interface Long2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte computeByteIfPresent(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByteIfPresent in interface Long2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte mergeByte(long key,
byte value,
ByteByteUnaryOperator mappingFunction)
Long2ByteMapmergeByte in interface Long2ByteMapkey - 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 Long2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic 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 java.util.AbstractMap<java.lang.Long,java.lang.Byte>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 Long2ByteMappublic byte getOrDefault(long key,
byte defaultValue)
Long2ByteMapgetOrDefault in interface Long2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic 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 java.util.AbstractMap<java.lang.Long,java.lang.Byte>key - the element that should be removedMap.remove(Object)public void forEach(LongByteConsumer action)
Long2ByteMapforEach in interface Long2ByteMapaction - processor of the values that are iterator overpublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Byte>keySet in interface Long2ByteMapkeySet in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>public ByteCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Byte>values in interface Long2ByteMapvalues in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>public ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Byte>> entrySet()
entrySet in interface java.util.Map<java.lang.Long,java.lang.Byte>entrySet in interface Long2ByteMapentrySet in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Long,java.lang.Byte>equals in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>public int hashCode()
hashCode in interface java.util.Map<java.lang.Long,java.lang.Byte>hashCode in class java.util.AbstractMap<java.lang.Long,java.lang.Byte>