V - the keyType of elements maintained by this Collectionpublic static class Byte2ObjectMaps.EmptyMap<V> extends AbstractByte2ObjectMap<V>
AbstractByte2ObjectMap.BasicEntry<V>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 |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
ObjectSet<Byte2ObjectMap.Entry<V>> |
byte2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
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
|
Byte2ObjectMaps.EmptyMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
V |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(byte key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
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(byte key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(byte key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(byte key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
supplyIfAbsent(byte key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceObjects, replaceObjects, setDefaultReturnValueapply, builder, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic V put(byte key, V value)
Byte2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(byte key, V value)
Byte2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remove(byte key)
Byte2ObjectMapkey - the element that should be removedpublic V removeOrDefault(byte key, V defaultValue)
Byte2ObjectMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
V value)
Byte2ObjectMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V get(byte key)
Byte2ObjectMapkey - the key that is searched forpublic V getOrDefault(byte key, V defaultValue)
Byte2ObjectMapgetOrDefault in interface Byte2ObjectMap<V>getOrDefault in class AbstractByte2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V compute(byte key, ByteObjectUnaryOperator<V> mappingFunction)
Byte2ObjectMapcompute in interface Byte2ObjectMap<V>compute in class AbstractByte2ObjectMap<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>computeIfAbsent in class AbstractByte2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(byte key, ByteObjectUnaryOperator<V> mappingFunction)
Byte2ObjectMapcomputeIfPresent in interface Byte2ObjectMap<V>computeIfPresent in class AbstractByte2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V supplyIfAbsent(byte key, ObjectSupplier<V> valueProvider)
Byte2ObjectMapsupplyIfAbsent in interface Byte2ObjectMap<V>supplyIfAbsent in class AbstractByte2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V merge(byte key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Byte2ObjectMapmerge in interface Byte2ObjectMap<V>merge in class AbstractByte2ObjectMap<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>mergeAll in class AbstractByte2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,V>keySet in interface Byte2ObjectMap<V>keySet in class AbstractByte2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Byte,V>values in interface Byte2ObjectMap<V>values in class AbstractByte2ObjectMap<V>public ObjectSet<Byte2ObjectMap.Entry<V>> byte2ObjectEntrySet()
Byte2ObjectMappublic Byte2ObjectMaps.EmptyMap<V> copy()
Byte2ObjectMapcopy in interface Byte2ObjectMap<V>copy in class AbstractByte2ObjectMap<V>