public class Byte2BooleanArrayMap extends AbstractByte2BooleanMap implements Byte2BooleanSortedMap
AbstractByte2BooleanMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2BooleanSortedMap.FastSortedSetByte2BooleanMap.Entry, Byte2BooleanMap.FastEntrySet| Constructor and Description |
|---|
Byte2BooleanArrayMap()
Default Constructor
|
Byte2BooleanArrayMap(byte[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2BooleanArrayMap(java.lang.Byte[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2BooleanArrayMap(byte[] keys,
boolean[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Byte2BooleanArrayMap(java.lang.Byte[] keys,
java.lang.Boolean[] values,
int length)
Helper constructor that allow to create a map from boxed values (it will unbox them) with a custom length
|
Byte2BooleanArrayMap(Byte2BooleanMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2BooleanArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Byte2BooleanArrayMap(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.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectSortedSet<Byte2BooleanMap.Entry> |
byte2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
ByteComparator |
comparator() |
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) |
boolean |
containsValue(boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
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 |
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 |
getBoolean(byte key)
A Type Specific get method to reduce boxing/unboxing
|
boolean |
getOrDefault(byte key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Byte2BooleanSortedMap |
headMap(byte toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
ByteSet |
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 |
remByte(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remByteOrDefault(byte key,
boolean defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(byte key,
boolean value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Boolean |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
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() |
Byte2BooleanSortedMap |
subMap(byte fromKey,
byte toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Byte2BooleanSortedMap |
tailMap(byte fromKey)
A Type Specific TailMap method to reduce boxing/unboxing
|
BooleanCollection |
values() |
entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceBooleans, replaceBooleans, setDefaultReturnValuefirstKey, headMap, lastKey, subMap, tailMapcompute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceBooleans, replaceBooleans, setDefaultReturnValuepublic Byte2BooleanArrayMap()
public Byte2BooleanArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Byte2BooleanArrayMap(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 lengthpublic Byte2BooleanArrayMap(java.lang.Byte[] keys,
java.lang.Boolean[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lengthpublic Byte2BooleanArrayMap(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 Byte2BooleanArrayMap(byte[] keys,
boolean[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Byte2BooleanArrayMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic Byte2BooleanArrayMap(Byte2BooleanMap map)
map - the values that should be present in the mappublic 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)
Byte2BooleanSortedMapputAndMoveToFirst in interface Byte2BooleanSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean putAndMoveToLast(byte key,
boolean value)
Byte2BooleanSortedMapputAndMoveToLast in interface Byte2BooleanSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2BooleanSortedMapmoveToFirst in interface Byte2BooleanSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2BooleanSortedMapmoveToLast in interface Byte2BooleanSortedMapkey - that should be moved to the first lastpublic boolean containsKey(byte key)
Byte2BooleanMapcontainsKey in interface Byte2BooleanMapcontainsKey in class AbstractByte2BooleanMapkey - element that is searched forpublic boolean containsValue(boolean value)
Byte2BooleanMapcontainsValue in interface Byte2BooleanMapcontainsValue in class AbstractByte2BooleanMapvalue - element that is searched forpublic 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(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 getBoolean(byte key)
Byte2BooleanMapgetBoolean in interface Byte2BooleanFunctiongetBoolean in interface Byte2BooleanMapkey - the key that is searched forpublic 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 boolean getAndMoveToFirst(byte key)
Byte2BooleanSortedMapgetAndMoveToFirst in interface Byte2BooleanSortedMapkey - that is searched forpublic boolean getAndMoveToLast(byte key)
Byte2BooleanSortedMapgetAndMoveToLast in interface Byte2BooleanSortedMapkey - that is searched forpublic byte firstByteKey()
Byte2BooleanSortedMapfirstByteKey in interface Byte2BooleanSortedMappublic byte lastByteKey()
Byte2BooleanSortedMaplastByteKey in interface Byte2BooleanSortedMappublic boolean firstBooleanValue()
Byte2BooleanSortedMapfirstBooleanValue in interface Byte2BooleanSortedMappublic boolean lastBooleanValue()
Byte2BooleanSortedMaplastBooleanValue in interface Byte2BooleanSortedMappublic byte pollFirstByteKey()
Byte2BooleanSortedMappollFirstByteKey in interface Byte2BooleanSortedMappublic byte pollLastByteKey()
Byte2BooleanSortedMappollLastByteKey in interface Byte2BooleanSortedMappublic boolean remByte(byte key)
Byte2BooleanMapremByte in interface Byte2BooleanMapkey - the element that should be removedpublic boolean remByteOrDefault(byte key,
boolean defaultValue)
Byte2BooleanMapremByteOrDefault in interface Byte2BooleanMapkey - 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,
boolean value)
Byte2BooleanMapremove in interface Byte2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)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 java.util.AbstractMap<java.lang.Byte,java.lang.Boolean>key - the element that should be removedMap.remove(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 void forEach(ByteBooleanConsumer action)
Byte2BooleanMapforEach in interface Byte2BooleanMapforEach in class AbstractByte2BooleanMapaction - processor of the values that are iterator overpublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Boolean>keySet in interface java.util.SortedMap<java.lang.Byte,java.lang.Boolean>keySet in interface Byte2BooleanMapkeySet in interface Byte2BooleanSortedMapkeySet in class AbstractByte2BooleanMappublic BooleanCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Boolean>values in interface java.util.SortedMap<java.lang.Byte,java.lang.Boolean>values in interface Byte2BooleanMapvalues in interface Byte2BooleanSortedMapvalues in class AbstractByte2BooleanMappublic ObjectSortedSet<Byte2BooleanMap.Entry> byte2BooleanEntrySet()
Byte2BooleanMapbyte2BooleanEntrySet in interface Byte2BooleanMappublic 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 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>public ByteComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Byte,java.lang.Boolean>comparator in interface Byte2BooleanSortedMappublic Byte2BooleanSortedMap subMap(byte fromKey, byte toKey)
Byte2BooleanSortedMapsubMap in interface Byte2BooleanSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Byte2BooleanSortedMap headMap(byte toKey)
Byte2BooleanSortedMapheadMap in interface Byte2BooleanSortedMaptoKey - where the headMap should endpublic Byte2BooleanSortedMap tailMap(byte fromKey)
Byte2BooleanSortedMaptailMap in interface Byte2BooleanSortedMapfromKey - where the TailMap should start