V - the keyType of elements maintained by this Collectionpublic abstract class AbstractByte2ObjectMap<V> extends java.util.AbstractMap<java.lang.Byte,V> implements Byte2ObjectMap<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractByte2ObjectMap.BasicEntry<V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ObjectMap.BuilderCache<V>, Byte2ObjectMap.Entry<V>, Byte2ObjectMap.FastEntrySet<V>, Byte2ObjectMap.MapBuilder| Constructor and Description |
|---|
AbstractByte2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(byte key,
ByteObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(byte key,
ByteFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(byte key,
ByteObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Byte2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Byte,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ByteObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(byte key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
ByteSet |
keySet() |
V |
merge(byte key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Byte2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(java.lang.Byte key,
V value)
Deprecated.
|
void |
putAll(byte[] keys,
V[] 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.Byte[] keys,
V[] 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(Byte2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends V> m) |
void |
putAllIfAbsent(Byte2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
remove(java.lang.Object key) |
V |
replace(byte key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceObjects(Byte2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(ByteObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractByte2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(byte key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
apply, builder, byte2ObjectEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, get, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic V getDefaultReturnValue()
Byte2ObjectMapgetDefaultReturnValue in interface Byte2ObjectMap<V>public AbstractByte2ObjectMap<V> setDefaultReturnValue(V v)
Byte2ObjectMapsetDefaultReturnValue in interface Byte2ObjectMap<V>v - value that should be the default return valuepublic Byte2ObjectMap<V> copy()
Byte2ObjectMapcopy in interface Byte2ObjectMap<V>@Deprecated public V put(java.lang.Byte key, V value)
put in interface java.util.Map<java.lang.Byte,V>put in interface Byte2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Byte,V>public void putAll(Byte2ObjectMap<V> m)
Byte2ObjectMapputAll in interface Byte2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Byte,? extends V> m)
public void putAll(byte[] keys,
V[] values,
int offset,
int size)
Byte2ObjectMapputAll in interface Byte2ObjectMap<V>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 putAll(java.lang.Byte[] keys,
V[] values,
int offset,
int size)
Byte2ObjectMapputAll in interface Byte2ObjectMap<V>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(Byte2ObjectMap<V> m)
Byte2ObjectMapputAllIfAbsent in interface Byte2ObjectMap<V>m - elements that should be added if not present.public boolean containsKey(byte key)
Byte2ObjectMapcontainsKey in interface Byte2ObjectMap<V>key - element that is searched forpublic boolean containsValue(java.lang.Object value)
public boolean replace(byte key,
V oldValue,
V newValue)
Byte2ObjectMapreplace in interface Byte2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(byte key, V value)
Byte2ObjectMapreplace in interface Byte2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Byte2ObjectMap<V> m)
Byte2ObjectMapreplaceObjects in interface Byte2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(ByteObjectUnaryOperator<V> mappingFunction)
Byte2ObjectMapreplaceObjects in interface Byte2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(byte key, ByteObjectUnaryOperator<V> mappingFunction)
Byte2ObjectMapcompute in interface Byte2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(byte key, ByteFunction<V> mappingFunction)
Byte2ObjectMapcomputeIfAbsent in interface Byte2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(byte key, ObjectSupplier<V> valueProvider)
Byte2ObjectMapsupplyIfAbsent in interface Byte2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(byte key, ByteObjectUnaryOperator<V> mappingFunction)
Byte2ObjectMapcomputeIfPresent in interface Byte2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(byte key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Byte2ObjectMapmerge in interface Byte2ObjectMap<V>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 mergeAll(Byte2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Byte2ObjectMapmergeAll in interface Byte2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,V>get in interface Byte2ObjectMap<V>get in class java.util.AbstractMap<java.lang.Byte,V>public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Byte,V>getOrDefault in interface Byte2ObjectMap<V>public V getOrDefault(byte key, V defaultValue)
Byte2ObjectMapgetOrDefault in interface Byte2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,V>remove in interface Byte2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Byte,V>key - the element that should be removedMap.remove(Object)public void forEach(ByteObjectConsumer<V> action)
Byte2ObjectMapforEach in interface Byte2ObjectMap<V>action - processor of the values that are iterator overpublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,V>keySet in interface Byte2ObjectMap<V>keySet in class java.util.AbstractMap<java.lang.Byte,V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Byte,V>values in interface Byte2ObjectMap<V>values in class java.util.AbstractMap<java.lang.Byte,V>public ObjectSet<java.util.Map.Entry<java.lang.Byte,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Byte,V>entrySet in interface Byte2ObjectMap<V>entrySet in class java.util.AbstractMap<java.lang.Byte,V>public boolean equals(java.lang.Object o)