T - the type of elements maintained by this Collectionpublic abstract class AbstractObject2ByteMap<T> extends java.util.AbstractMap<T,java.lang.Byte> implements Object2ByteMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2ByteMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ByteMap.Entry<T>, Object2ByteMap.FastEntrySet<T>| Constructor and Description |
|---|
AbstractObject2ByteMap() |
| Modifier and Type | Method and Description |
|---|---|
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,
Object2ByteFunction<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 |
containsKey(java.lang.Object key) |
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<T,java.lang.Byte>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectByteConsumer<T> 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.
|
java.lang.Byte |
getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue) |
int |
hashCode() |
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
|
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 |
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
|
ByteCollection |
values() |
clear, containsValue, isEmpty, put, remove, size, toStringaddTo, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getByte, getOrDefault, merge, object2ByteEntrySet, put, put, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, remove, replace, replace, replaceAllpublic byte getDefaultReturnValue()
Object2ByteMapgetDefaultReturnValue in interface Object2ByteMap<T>public AbstractObject2ByteMap<T> setDefaultReturnValue(byte v)
Object2ByteMapsetDefaultReturnValue in interface Object2ByteMap<T>v - value that should be the default return valuepublic void addToAll(Object2ByteMap<T> m)
Object2ByteMapaddToAll in interface Object2ByteMap<T>m - the values that should be added/insertedpublic void putAll(Object2ByteMap<T> m)
Object2ByteMapputAll in interface Object2ByteMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Byte> m)
public void putAll(T[] keys, byte[] values, int offset, int size)
Object2ByteMapputAll in interface Object2ByteMap<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 void putAllIfAbsent(Object2ByteMap<T> m)
Object2ByteMapputAllIfAbsent in interface Object2ByteMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(byte value)
Object2ByteMapcontainsValue in interface Object2ByteMap<T>value - element that is searched forpublic boolean replace(T key, byte oldValue, byte newValue)
Object2ByteMapreplace in interface Object2ByteMap<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>key - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Object2ByteMap<T> m)
Object2ByteMapreplaceBytes in interface Object2ByteMap<T>m - elements that should be replaced.public void replaceBytes(ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapreplaceBytes in interface Object2ByteMap<T>mappingFunction - operation to replace all valuespublic byte computeByte(T key, ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapcomputeByte in interface Object2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(T key, Object2ByteFunction<T> mappingFunction)
Object2ByteMapcomputeByteIfAbsent in interface Object2ByteMap<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>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte mergeByte(T key, byte value, ByteByteUnaryOperator mappingFunction)
Object2ByteMapmergeByte in interface Object2ByteMap<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>m - 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<T,java.lang.Byte>get in interface Object2ByteMap<T>get in class java.util.AbstractMap<T,java.lang.Byte>public java.lang.Byte getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Byte>getOrDefault in interface Object2ByteMap<T>public void forEach(ObjectByteConsumer<T> action)
Object2ByteMapforEach in interface Object2ByteMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Byte>keySet in interface Object2ByteMap<T>keySet in class java.util.AbstractMap<T,java.lang.Byte>public ByteCollection values()
values in interface java.util.Map<T,java.lang.Byte>values in interface Object2ByteMap<T>values in class java.util.AbstractMap<T,java.lang.Byte>public ObjectSet<java.util.Map.Entry<T,java.lang.Byte>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Byte>entrySet in interface Object2ByteMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Byte>public boolean equals(java.lang.Object o)