T - the keyType of elements maintained by this Collectionpublic static class Object2ByteMaps.SynchronizedMap<T> extends AbstractObject2ByteMap<T> implements Object2ByteMap<T>
AbstractObject2ByteMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ByteMap.BuilderCache<T>, Object2ByteMap.Entry<T>, Object2ByteMap.FastEntrySet<T>, Object2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(T key,
byte value)
A Helper method to add a primitives together.
|
void |
addToAll(Object2ByteMap<T> m)
A Helper method to bulk add primitives together.
|
byte |
computeByte(T key,
ObjectByteUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(T key,
ToByteFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(T key,
ObjectByteUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
Object2ByteMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(ObjectByteConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
byte |
getByte(T key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getDefaultReturnValue()
Method to see what the default return value is.
|
byte |
getOrDefault(T key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
void |
mergeAllByte(Object2ByteMap<T> m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(T key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2ByteMap.Entry<T>> |
object2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
put(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Byte> m) |
void |
putAll(Object2ByteMap<T> m)
Type Specific function for the bull putting of values
|
void |
putAll(T[] 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 |
putAllIfAbsent(Object2ByteMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
byte |
putIfAbsent(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
byte |
remOrDefault(T key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
replace(T key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceBytes(Object2ByteMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceBytes(ObjectByteUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractObject2ByteMap<T> |
setDefaultReturnValue(byte v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
byte |
subFrom(T key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(T key,
ByteSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ByteCollection |
values() |
containsKey, entrySet, equals, get, getOrDefault, hashCode, put, putAll, removeapplyAsByte, builder, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, get, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic byte getDefaultReturnValue()
Object2ByteMapgetDefaultReturnValue in interface Object2ByteMap<T>getDefaultReturnValue in class AbstractObject2ByteMap<T>public AbstractObject2ByteMap<T> setDefaultReturnValue(byte v)
Object2ByteMapsetDefaultReturnValue in interface Object2ByteMap<T>setDefaultReturnValue in class AbstractObject2ByteMap<T>v - value that should be the default return valuepublic byte put(T key, byte value)
Object2ByteMapput in interface Object2ByteMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(T key, byte value)
Object2ByteMapputIfAbsent in interface Object2ByteMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Object2ByteMap<T> m)
Object2ByteMapputAllIfAbsent in interface Object2ByteMap<T>putAllIfAbsent in class AbstractObject2ByteMap<T>m - elements that should be added if not present.public byte addTo(T key, byte value)
Object2ByteMapaddTo in interface Object2ByteMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(T key, byte value)
Object2ByteMapObject2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Object2ByteMap<T>key - that should be subtract fromvalue - that should be subtractpublic void addToAll(Object2ByteMap<T> m)
Object2ByteMapaddToAll in interface Object2ByteMap<T>addToAll in class AbstractObject2ByteMap<T>m - the values that should be added/insertedpublic void putAll(Object2ByteMap<T> m)
Object2ByteMapputAll in interface Object2ByteMap<T>putAll in class AbstractObject2ByteMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Byte> m)
putAll in interface java.util.Map<T,java.lang.Byte>putAll in class AbstractObject2ByteMap<T>public void putAll(T[] keys, byte[] values, int offset, int size)
Object2ByteMapputAll in interface Object2ByteMap<T>putAll in class AbstractObject2ByteMap<T>keys - 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 containsValue(byte value)
Object2ByteMapcontainsValue in interface Object2ByteMap<T>containsValue in class AbstractObject2ByteMap<T>value - element that is searched forpublic byte getByte(T key)
Object2ByteMapgetByte in interface Object2ByteMap<T>key - the key that is searched forpublic byte rem(T key)
Object2ByteMaprem in interface Object2ByteMap<T>key - the element that should be removedpublic byte remOrDefault(T key, byte defaultValue)
Object2ByteMapremOrDefault in interface Object2ByteMap<T>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, byte value)
Object2ByteMapremove in interface Object2ByteMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, byte oldValue, byte newValue)
Object2ByteMapreplace in interface Object2ByteMap<T>replace in class AbstractObject2ByteMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(T key, byte value)
Object2ByteMapreplace in interface Object2ByteMap<T>replace in class AbstractObject2ByteMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Object2ByteMap<T> m)
Object2ByteMapreplaceBytes in interface Object2ByteMap<T>replaceBytes in class AbstractObject2ByteMap<T>m - elements that should be replaced.public void replaceBytes(ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapreplaceBytes in interface Object2ByteMap<T>replaceBytes in class AbstractObject2ByteMap<T>mappingFunction - operation to replace all valuespublic byte computeByte(T key, ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapcomputeByte in interface Object2ByteMap<T>computeByte in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(T key, ToByteFunction<T> mappingFunction)
Object2ByteMapcomputeByteIfAbsent in interface Object2ByteMap<T>computeByteIfAbsent in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(T key, ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapcomputeByteIfPresent in interface Object2ByteMap<T>computeByteIfPresent in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(T key, ByteSupplier valueProvider)
Object2ByteMapsupplyByteIfAbsent in interface Object2ByteMap<T>supplyByteIfAbsent in class AbstractObject2ByteMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(T key, byte value, ByteByteUnaryOperator mappingFunction)
Object2ByteMapmergeByte in interface Object2ByteMap<T>mergeByte in class AbstractObject2ByteMap<T>key - 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(Object2ByteMap<T> m, ByteByteUnaryOperator mappingFunction)
Object2ByteMapmergeAllByte in interface Object2ByteMap<T>mergeAllByte in class AbstractObject2ByteMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic byte getOrDefault(T key, byte defaultValue)
Object2ByteMapgetOrDefault in interface Object2ByteMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ObjectByteConsumer<T> action)
Object2ByteMapforEach in interface Object2ByteMap<T>forEach in class AbstractObject2ByteMap<T>action - processor of the values that are iterator overpublic int size()
public Object2ByteMap<T> copy()
Object2ByteMapcopy in interface Object2ByteMap<T>copy in class AbstractObject2ByteMap<T>public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Byte>keySet in interface Object2ByteMap<T>keySet in class AbstractObject2ByteMap<T>public ByteCollection values()
values in interface java.util.Map<T,java.lang.Byte>values in interface Object2ByteMap<T>values in class AbstractObject2ByteMap<T>public ObjectSet<Object2ByteMap.Entry<T>> object2ByteEntrySet()
Object2ByteMapobject2ByteEntrySet in interface Object2ByteMap<T>