Modul speiger.src.collections
Schnittstelle Float2BooleanMap
- Alle Superschnittstellen:
FloatPredicate,Map<Float,Boolean>
- Alle bekannten Unterschnittstellen:
Float2BooleanConcurrentMap,Float2BooleanNavigableMap,Float2BooleanOrderedMap,Float2BooleanSortedMap
- Alle bekannten Implementierungsklassen:
AbstractFloat2BooleanMap,Float2BooleanArrayMap,Float2BooleanAVLTreeMap,Float2BooleanConcurrentOpenHashMap,Float2BooleanLinkedOpenCustomHashMap,Float2BooleanLinkedOpenHashMap,Float2BooleanMaps.EmptyMap,Float2BooleanMaps.SingletonMap,Float2BooleanMaps.SynchronizedMap,Float2BooleanMaps.SynchronizedNavigableMap,Float2BooleanMaps.SynchronizedOrderedMap,Float2BooleanMaps.SynchronizedSortedMap,Float2BooleanMaps.UnmodifyableMap,Float2BooleanMaps.UnmodifyableNavigableMap,Float2BooleanMaps.UnmodifyableOrderedMap,Float2BooleanMaps.UnmodifyableSortedMap,Float2BooleanOpenCustomHashMap,Float2BooleanOpenHashMap,Float2BooleanRBTreeMap,ImmutableFloat2BooleanOpenHashMap
A Type Specific Map that reduces memory overhead due to boxing/unboxing of Primitives
and some extra helper functions.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic classBuilder Cache for allowing to buildMapsstatic interfaceType Specific Map Entry that reduces boxing/unboxingstatic interfaceFast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal valuestatic final classHelper class that reduces the method spam of the Map Class. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Float2BooleanMap.MapBuilderbuilder()Helper Class that allows to create Maps without requiring a to type out the entire implementation or know it.default BooleanVeraltet.booleancomputeBoolean(float key, FloatBooleanUnaryOperator mappingFunction) A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleancomputeBooleanIfAbsent(float key, FloatPredicate mappingFunction) A Type Specific computeIfAbsent method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleancomputeBooleanIfAbsentNonDefault(float key, FloatPredicate mappingFunction) A Type Specific computeIfAbsent method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleancomputeBooleanIfPresent(float key, FloatBooleanUnaryOperator mappingFunction) A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleancomputeBooleanIfPresentNonDefault(float key, FloatBooleanUnaryOperator mappingFunction) A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleancomputeBooleanNonDefault(float key, FloatBooleanUnaryOperator mappingFunction) A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".default BooleancomputeIfAbsent(Float key, Function<? super Float, ? extends Boolean> mappingFunction) Veraltet.default BooleancomputeIfPresent(Float key, BiFunction<? super Float, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet.booleancontainsKey(float key) Type Specific method to reduce boxing/unboxing of valuesdefault booleancontainsKey(Object key) booleancontainsValue(boolean value) Type Specific method to reduce boxing/unboxing of valuesdefault booleancontainsValue(Object value) copy()A Function that does a shallow clone of the Map itself.entrySet()Veraltet.Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.default voidforEach(BiConsumer<? super Float, ? super Boolean> action) Veraltet.voidforEach(FloatBooleanConsumer action) Type Specific forEach method to reduce boxing/unboxingbooleanget(float key) A Type Specific get method to reduce boxing/unboxingdefault BooleanVeraltet.booleanMethod to see what the default return value is.booleangetOrDefault(float key, boolean defaultValue) A Type Specific getOrDefault method to reduce boxing/unboxingdefault BooleangetOrDefault(Object key, Boolean defaultValue) Veraltet.keySet()default Booleanmerge(Float key, Boolean value, BiFunction<? super Boolean, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet.voidmergeAllBoolean(Float2BooleanMap m, BooleanBooleanUnaryOperator mappingFunction) A Bulk method for merging Maps.booleanmergeBoolean(float key, boolean value, BooleanBooleanUnaryOperator mappingFunction) A Type Specific merge method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleanput(float key, boolean value) Type Specific method to reduce boxing/unboxing of valuesdefault BooleanVeraltet.default BooleanA Helper method that allows to put int a Map.Entry into a map.default booleanput(Float2BooleanMap.Entry entry) A Helper method that allows to put int a Float2BooleanMap.Entry into a map.default voidputAll(float[] keys, boolean[] values) Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performancesvoidputAll(float[] keys, boolean[] values, int offset, int size) Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performancesdefault voidType Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performancesvoidType Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performancesvoidType Specific function for the bull putting of valuesvoidType-Specific bulk put method put elements into the map if not present.booleanputIfAbsent(float key, boolean value) Type Specific method to reduce boxing/unboxing of valuesdefault BooleanputIfAbsent(Float key, Boolean value) Veraltet.booleanremove(float key) Type Specific remove function to reduce boxing/unboxingbooleanremove(float key, boolean value) Type Specific remove function to reduce boxing/unboxingdefault Booleandefault booleanbooleanremoveOrDefault(float key, boolean defaultValue) Type-Specific Remove function with a default return value if wanted.booleanreplace(float key, boolean value) A Type Specific replace method to reduce boxing/unboxing replace an existing valuebooleanreplace(float key, boolean oldValue, boolean newValue) A Type Specific replace method to replace an existing valuedefault BooleanVeraltet.default booleanVeraltet.default voidreplaceAll(BiFunction<? super Float, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet.voidreplaceBooleans(FloatBooleanUnaryOperator mappingFunction) A Type Specific mass replace method to reduce boxing/unboxingvoidType-Specific bulk replace method.setDefaultReturnValue(boolean v) Method to define the default return value if a requested key isn't presentbooleansupplyBooleanIfAbsent(float key, BooleanSupplier valueProvider) A Supplier based computeIfAbsent function to fill the most used usecase of this function If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".booleansupplyBooleanIfAbsentNonDefault(float key, BooleanSupplier valueProvider) A Supplier based computeIfAbsent function to fill the most used usecase of this function If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null".default Float2BooleanMapCreates a Wrapped Map that is Synchronizeddefault Float2BooleanMapsynchronize(Object mutex) Creates a Wrapped Map that is Synchronizeddefault booleantest(float key) Type Specific get function to reduce boxing/unboxingdefault Float2BooleanMapCreates a Wrapped Map that is unmodifiablevalues()Von Schnittstelle geerbte Methoden speiger.src.collections.floats.functions.function.FloatPredicate
andType, negate, orType
-
Methodendetails
-
builder
Helper Class that allows to create Maps without requiring a to type out the entire implementation or know it.- Gibt zurück:
- a MapBuilder
-
getDefaultReturnValue
boolean getDefaultReturnValue()Method to see what the default return value is.- Gibt zurück:
- default return value
-
setDefaultReturnValue
Method to define the default return value if a requested key isn't present- Parameter:
v- value that should be the default return value- Gibt zurück:
- itself
-
copy
Float2BooleanMap copy()A Function that does a shallow clone of the Map itself. This function is more optimized then a copy constructor since the Map does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk- Gibt zurück:
- a Shallow Copy of the Map
- Note:
- Wrappers and view Maps will not support this feature
-
put
boolean put(float key, boolean value) Type Specific method to reduce boxing/unboxing of values- Parameter:
key- the key that should be inserted,value- the value that should be inserted- Gibt zurück:
- the last present value or default return value.
- Siehe auch:
-
put
A Helper method that allows to put int a Float2BooleanMap.Entry into a map.- Parameter:
entry- then Entry that should be inserted.- Gibt zurück:
- the last present value or default return value.
-
put
A Helper method that allows to put int a Map.Entry into a map.- Parameter:
entry- then Entry that should be inserted.- Gibt zurück:
- the last present value or default return value.
-
putAll
default void putAll(float[] keys, boolean[] values) Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances- Parameter:
keys- the keys that should be addedvalues- the values that should be added- Löst aus:
IllegalStateException- if the arrays are not the same size- Siehe auch:
-
putAll
void putAll(float[] keys, boolean[] values, int offset, int size) Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances- Parameter:
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 added- Löst aus:
IllegalStateException- if the arrays are not within the range- Siehe auch:
-
putAll
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances- Parameter:
keys- the keys that should be addedvalues- the values that should be added- Löst aus:
IllegalStateException- if the arrays are not the same size- Siehe auch:
-
putAll
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances- Parameter:
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 added- Löst aus:
IllegalStateException- if the arrays are not within the range- Siehe auch:
-
putIfAbsent
boolean putIfAbsent(float key, boolean value) Type Specific method to reduce boxing/unboxing of values- Parameter:
key- the key that should be inserted,value- the value that should be inserted- Gibt zurück:
- the last present value or default return value.
- Siehe auch:
-
putAllIfAbsent
Type-Specific bulk put method put elements into the map if not present.- Parameter:
m- elements that should be added if not present.
-
putAll
Type Specific function for the bull putting of values- Parameter:
m- the elements that should be inserted
-
containsKey
boolean containsKey(float key) Type Specific method to reduce boxing/unboxing of values- Parameter:
key- element that is searched for- Gibt zurück:
- if the key is present
-
containsKey
- Angegeben von:
containsKeyin SchnittstelleMap<Float,Boolean> - Parameter:
key- that is searched for.- Gibt zurück:
- true if found
- Siehe auch:
- Note:
- in some implementations key does not have to be Float but just have to support equals with Float.
-
containsValue
boolean containsValue(boolean value) Type Specific method to reduce boxing/unboxing of values- Parameter:
value- element that is searched for- Gibt zurück:
- if the value is present
-
containsValue
- Angegeben von:
containsValuein SchnittstelleMap<Float,Boolean> - Parameter:
value- that is searched for.- Gibt zurück:
- true if found
- Siehe auch:
- Note:
- in some implementations key does not have to be CLASS_VALUE but just have to support equals with CLASS_VALUE.
-
remove
boolean remove(float key) Type Specific remove function to reduce boxing/unboxing- Parameter:
key- the element that should be removed- Gibt zurück:
- the value that was removed or default return value
-
remove
-
remove
boolean remove(float key, boolean value) Type Specific remove function to reduce boxing/unboxing- Parameter:
key- the element that should be removedvalue- the expected value that should be found- Gibt zurück:
- true if the key and value was found and removed
- Siehe auch:
-
remove
-
removeOrDefault
boolean removeOrDefault(float key, boolean defaultValue) Type-Specific Remove function with a default return value if wanted.- Parameter:
key- the element that should be removeddefaultValue- the value that should be returned if the entry doesn't exist- Gibt zurück:
- the value that was removed or default value
- Siehe auch:
-
replace
boolean replace(float key, boolean oldValue, boolean newValue) A Type Specific replace method to replace an existing value- Parameter:
key- the element that should be searched foroldValue- the expected value to be replacednewValue- the value to replace the oldValue with.- Gibt zurück:
- true if the value got replaced
- Note:
- this fails if the value is not present even if it matches the oldValue
-
replace
boolean replace(float key, boolean value) A Type Specific replace method to reduce boxing/unboxing replace an existing value- Parameter:
key- the element that should be searched forvalue- the value to replace with.- Gibt zurück:
- the present value or default return value
- Note:
- this fails if the value is not present
-
replaceBooleans
Type-Specific bulk replace method. Could be seen as putAllIfPresent- Parameter:
m- elements that should be replaced.
-
replaceBooleans
A Type Specific mass replace method to reduce boxing/unboxing- Parameter:
mappingFunction- operation to replace all values
-
computeBoolean
A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value- Gibt zurück:
- the result of the computation
-
computeBooleanIfAbsent
A Type Specific computeIfAbsent method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value if not present- Gibt zurück:
- the result of the computed value or present value
-
supplyBooleanIfAbsent
A Supplier based computeIfAbsent function to fill the most used usecase of this function If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedvalueProvider- the value if not present- Gibt zurück:
- the result of the computed value or present value
-
computeBooleanIfPresent
A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value if present- Gibt zurück:
- the result of the default return value or present value
- Note:
- if not present then compute is not executed
-
computeBooleanNonDefault
A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value- Gibt zurück:
- the result of the computation
-
computeBooleanIfAbsentNonDefault
A Type Specific computeIfAbsent method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value if not present- Gibt zurück:
- the result of the computed value or present value
-
supplyBooleanIfAbsentNonDefault
A Supplier based computeIfAbsent function to fill the most used usecase of this function If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedvalueProvider- the value if not present- Gibt zurück:
- the result of the computed value or present value
-
computeBooleanIfPresentNonDefault
A Type Specific compute method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value if present- Gibt zurück:
- the result of the default return value or present value
- Note:
- if not present then compute is not executed
-
mergeBoolean
A Type Specific merge method to reduce boxing/unboxing If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
key- the key that should be be searched forvalue- the value that should be merged withmappingFunction- the operator that should generate the new Value- Gibt zurück:
- the result of the merge
- Note:
- if the result matches the default return value then the key is removed from the map
-
mergeAllBoolean
A Bulk method for merging Maps. If the generated value equals the getDefaultReturnValue it will simply not insert it since that is treated as "null". A "Null Value" will be treated as "Do not insert/remove" based on how the Java has specified it.- Parameter:
m- the entries that should be bulk addedmappingFunction- the operator that should generate the new Value- Note:
- if the result matches the default return value then the key is removed from the map
-
replace
Veraltet. -
replace
Veraltet. -
test
default boolean test(float key) Beschreibung aus Schnittstelle kopiert:FloatPredicateType Specific get function to reduce boxing/unboxing- Angegeben von:
testin SchnittstelleFloatPredicate- Parameter:
key- the value that should be processed- Gibt zurück:
- the result of the function
-
get
boolean get(float key) A Type Specific get method to reduce boxing/unboxing- Parameter:
key- the key that is searched for- Gibt zurück:
- the searched value or default return value
-
getOrDefault
boolean getOrDefault(float key, boolean defaultValue) A Type Specific getOrDefault method to reduce boxing/unboxing- Parameter:
key- the key that is searched fordefaultValue- the value that should be returned if the key is not present- Gibt zurück:
- the searched value or defaultValue value
-
get
Veraltet. -
getOrDefault
Veraltet.- Angegeben von:
getOrDefaultin SchnittstelleMap<Float,Boolean>
-
replaceAll
@Deprecated default void replaceAll(BiFunction<? super Float, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet.- Angegeben von:
replaceAllin SchnittstelleMap<Float,Boolean>
-
compute
@Deprecated default Boolean compute(Float key, BiFunction<? super Float, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet. -
computeIfAbsent
@Deprecated default Boolean computeIfAbsent(Float key, Function<? super Float, ? extends Boolean> mappingFunction) Veraltet.- Angegeben von:
computeIfAbsentin SchnittstelleMap<Float,Boolean>
-
computeIfPresent
@Deprecated default Boolean computeIfPresent(Float key, BiFunction<? super Float, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet.- Angegeben von:
computeIfPresentin SchnittstelleMap<Float,Boolean>
-
merge
@Deprecated default Boolean merge(Float key, Boolean value, BiFunction<? super Boolean, ? super Boolean, ? extends Boolean> mappingFunction) Veraltet. -
forEach
Type Specific forEach method to reduce boxing/unboxing- Parameter:
action- processor of the values that are iterator over
-
forEach
Veraltet. -
keySet
FloatSet keySet() -
values
BooleanCollection values() -
entrySet
Veraltet. -
float2BooleanEntrySet
ObjectSet<Float2BooleanMap.Entry> float2BooleanEntrySet()Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.- Gibt zurück:
- a EntrySet of the collection
-
synchronize
Creates a Wrapped Map that is Synchronized- Gibt zurück:
- a new Map that is synchronized
- Siehe auch:
-
synchronize
Creates a Wrapped Map that is Synchronized- Parameter:
mutex- is the controller of the synchronization block- Gibt zurück:
- a new Map Wrapper that is synchronized
- Siehe auch:
-
unmodifiable
Creates a Wrapped Map that is unmodifiable- Gibt zurück:
- a new Map Wrapper that is unmodifiable
- Siehe auch:
-
put
Veraltet. -
putIfAbsent
Veraltet.- Angegeben von:
putIfAbsentin SchnittstelleMap<Float,Boolean>
-