public class ImmutableByte2BooleanOpenHashMap extends AbstractByte2BooleanMap implements Byte2BooleanOrderedMap
AbstractByte2BooleanMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2BooleanOrderedMap.FastOrderedSetByte2BooleanMap.BuilderCache, Byte2BooleanMap.Entry, Byte2BooleanMap.FastEntrySet, Byte2BooleanMap.MapBuilder| Constructor and Description |
|---|
ImmutableByte2BooleanOpenHashMap(byte[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
ImmutableByte2BooleanOpenHashMap(java.lang.Byte[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
ImmutableByte2BooleanOpenHashMap(byte[] keys,
boolean[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
ImmutableByte2BooleanOpenHashMap(java.lang.Byte[] keys,
java.lang.Boolean[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
ImmutableByte2BooleanOpenHashMap(Byte2BooleanMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
ImmutableByte2BooleanOpenHashMap(Byte2BooleanMap map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
ImmutableByte2BooleanOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Boolean> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
ImmutableByte2BooleanOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Boolean> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectOrderedSet<Byte2BooleanMap.Entry> |
byte2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
boolean |
computeBoolean(byte key,
ByteBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfAbsent(byte key,
Byte2BooleanFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfPresent(byte key,
ByteBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
ImmutableByte2BooleanOpenHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
boolean |
firstBooleanValue()
A method to get the first Value of a Map.
|
byte |
firstByteKey()
A method to get the first Key of a Map.
|
void |
forEach(ByteBooleanConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
boolean |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Boolean |
get(java.lang.Object key) |
boolean |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
boolean |
getAndMoveToLast(byte key)
A Specific get method that allows to move teh given key/value int the last index.
|
boolean |
getOrDefault(byte key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteOrderedSet |
keySet() |
boolean |
lastBooleanValue()
A method to get the last Value of a Map.
|
byte |
lastByteKey()
A method to get the last Key of a Map.
|
void |
mergeAllBoolean(Byte2BooleanMap m,
BooleanBooleanUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
boolean |
mergeBoolean(byte key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(byte key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(byte key)
A specific move method to move a given key/value to the last index.
|
byte |
pollFirstByteKey()
A method to get and remove the first Key of a Map.
|
byte |
pollLastByteKey()
A method to get and remove the last Key of a Map.
|
boolean |
put(byte key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
putAndMoveToFirst(byte key,
boolean value)
A customized put method that allows you to insert into the first index.
|
boolean |
putAndMoveToLast(byte key,
boolean value)
A customized put method that allows you to insert into the last index.
|
boolean |
putIfAbsent(byte key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
boolean value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Boolean |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
removeOrDefault(byte key,
boolean defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
replace(byte key,
boolean value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
boolean oldValue,
boolean newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
boolean |
supplyBooleanIfAbsent(byte key,
BooleanSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
BooleanCollection |
values() |
entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceBooleans, replaceBooleans, setDefaultReturnValuesynchronize, synchronize, unmodifiablebuilder, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceBooleans, replaceBooleans, setDefaultReturnValuepublic ImmutableByte2BooleanOpenHashMap(java.lang.Byte[] keys,
java.lang.Boolean[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic ImmutableByte2BooleanOpenHashMap(java.lang.Byte[] keys,
java.lang.Boolean[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableByte2BooleanOpenHashMap(byte[] keys,
boolean[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic ImmutableByte2BooleanOpenHashMap(byte[] keys,
boolean[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableByte2BooleanOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic ImmutableByte2BooleanOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Boolean> map,
float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableByte2BooleanOpenHashMap(Byte2BooleanMap map)
map - the values that should be present in the mappublic ImmutableByte2BooleanOpenHashMap(Byte2BooleanMap map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean put(byte key,
boolean value)
Byte2BooleanMapput in interface Byte2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public boolean putIfAbsent(byte key,
boolean value)
Byte2BooleanMapputIfAbsent in interface Byte2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public boolean putAndMoveToFirst(byte key,
boolean value)
Byte2BooleanOrderedMapputAndMoveToFirst in interface Byte2BooleanOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean putAndMoveToLast(byte key,
boolean value)
Byte2BooleanOrderedMapputAndMoveToLast in interface Byte2BooleanOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2BooleanOrderedMapmoveToFirst in interface Byte2BooleanOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2BooleanOrderedMapmoveToLast in interface Byte2BooleanOrderedMapkey - that should be moved to the first lastpublic boolean getAndMoveToFirst(byte key)
Byte2BooleanOrderedMapgetAndMoveToFirst in interface Byte2BooleanOrderedMapkey - that is searched forpublic boolean getAndMoveToLast(byte key)
Byte2BooleanOrderedMapgetAndMoveToLast in interface Byte2BooleanOrderedMapkey - that is searched forpublic boolean containsKey(byte key)
Byte2BooleanMapcontainsKey in interface Byte2BooleanMapcontainsKey in class AbstractByte2BooleanMapkey - element that is searched for@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Byte,java.lang.Boolean>containsKey in interface Byte2BooleanMapcontainsKey in class java.util.AbstractMap<java.lang.Byte,java.lang.Boolean>key - that is searched for.Map.containsKey(Object)public boolean containsValue(boolean value)
Byte2BooleanMapcontainsValue in interface Byte2BooleanMapcontainsValue in class AbstractByte2BooleanMapvalue - element that is searched for@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Byte,java.lang.Boolean>containsValue in interface Byte2BooleanMapcontainsValue in class java.util.AbstractMap<java.lang.Byte,java.lang.Boolean>value - that is searched for.Map.containsValue(Object)public boolean remove(byte key)
Byte2BooleanMapremove in interface Byte2BooleanMapkey - the element that should be removedpublic boolean removeOrDefault(byte key,
boolean defaultValue)
Byte2BooleanMapremoveOrDefault in interface Byte2BooleanMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)@Deprecated public java.lang.Boolean remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,java.lang.Boolean>remove in interface Byte2BooleanMapremove in class AbstractByte2BooleanMapkey - the element that should be removedMap.remove(Object)public boolean remove(byte key,
boolean value)
Byte2BooleanMapremove in interface Byte2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Byte,java.lang.Boolean>remove in interface Byte2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean get(byte key)
Byte2BooleanMapget in interface Byte2BooleanFunctionget in interface Byte2BooleanMapkey - the key that is searched forpublic java.lang.Boolean get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Boolean>get in interface Byte2BooleanMapget in class AbstractByte2BooleanMappublic boolean getOrDefault(byte key,
boolean defaultValue)
Byte2BooleanMapgetOrDefault in interface Byte2BooleanMapgetOrDefault in class AbstractByte2BooleanMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte firstByteKey()
Byte2BooleanOrderedMapfirstByteKey in interface Byte2BooleanOrderedMappublic byte pollFirstByteKey()
Byte2BooleanOrderedMappollFirstByteKey in interface Byte2BooleanOrderedMappublic byte lastByteKey()
Byte2BooleanOrderedMaplastByteKey in interface Byte2BooleanOrderedMappublic byte pollLastByteKey()
Byte2BooleanOrderedMappollLastByteKey in interface Byte2BooleanOrderedMappublic boolean firstBooleanValue()
Byte2BooleanOrderedMapfirstBooleanValue in interface Byte2BooleanOrderedMappublic boolean lastBooleanValue()
Byte2BooleanOrderedMaplastBooleanValue in interface Byte2BooleanOrderedMappublic ObjectOrderedSet<Byte2BooleanMap.Entry> byte2BooleanEntrySet()
Byte2BooleanMapbyte2BooleanEntrySet in interface Byte2BooleanMapbyte2BooleanEntrySet in interface Byte2BooleanOrderedMappublic ByteOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Boolean>keySet in interface Byte2BooleanMapkeySet in interface Byte2BooleanOrderedMapkeySet in class AbstractByte2BooleanMappublic BooleanCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Boolean>values in interface Byte2BooleanMapvalues in class AbstractByte2BooleanMappublic ImmutableByte2BooleanOpenHashMap copy()
Byte2BooleanMapcopy in interface Byte2BooleanMapcopy in interface Byte2BooleanOrderedMapcopy in class AbstractByte2BooleanMappublic void forEach(ByteBooleanConsumer action)
Byte2BooleanMapforEach in interface Byte2BooleanMapforEach in class AbstractByte2BooleanMapaction - processor of the values that are iterator overpublic boolean replace(byte key,
boolean oldValue,
boolean newValue)
Byte2BooleanMapreplace in interface Byte2BooleanMapreplace in class AbstractByte2BooleanMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public boolean replace(byte key,
boolean value)
Byte2BooleanMapreplace in interface Byte2BooleanMapreplace in class AbstractByte2BooleanMapkey - the element that should be searched forvalue - the value to replace with.public boolean computeBoolean(byte key,
ByteBooleanUnaryOperator mappingFunction)
Byte2BooleanMapcomputeBoolean in interface Byte2BooleanMapcomputeBoolean in class AbstractByte2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic boolean computeBooleanIfAbsent(byte key,
Byte2BooleanFunction mappingFunction)
Byte2BooleanMapcomputeBooleanIfAbsent in interface Byte2BooleanMapcomputeBooleanIfAbsent in class AbstractByte2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic boolean supplyBooleanIfAbsent(byte key,
BooleanSupplier valueProvider)
Byte2BooleanMapsupplyBooleanIfAbsent in interface Byte2BooleanMapsupplyBooleanIfAbsent in class AbstractByte2BooleanMapkey - the key that should be computedvalueProvider - the value if not presentpublic boolean computeBooleanIfPresent(byte key,
ByteBooleanUnaryOperator mappingFunction)
Byte2BooleanMapcomputeBooleanIfPresent in interface Byte2BooleanMapcomputeBooleanIfPresent in class AbstractByte2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic boolean mergeBoolean(byte key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
Byte2BooleanMapmergeBoolean in interface Byte2BooleanMapmergeBoolean in class AbstractByte2BooleanMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllBoolean(Byte2BooleanMap m, BooleanBooleanUnaryOperator mappingFunction)
Byte2BooleanMapmergeAllBoolean in interface Byte2BooleanMapmergeAllBoolean in class AbstractByte2BooleanMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Boolean>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Boolean>public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Boolean>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Boolean>