Modul speiger.src.collections
Klasse AbstractShort2LongMap
java.lang.Object
java.util.AbstractMap<Short,Long>
speiger.src.collections.shorts.maps.abstracts.AbstractShort2LongMap
- Alle implementierten Schnittstellen:
Map<Short,,Long> Short2LongFunction,Short2LongMap
- Bekannte direkte Unterklassen:
ImmutableShort2LongOpenHashMap,Short2LongArrayMap,Short2LongAVLTreeMap,Short2LongConcurrentOpenHashMap,Short2LongMaps.EmptyMap,Short2LongMaps.SingletonMap,Short2LongMaps.SynchronizedMap,Short2LongMaps.UnmodifyableMap,Short2LongOpenCustomHashMap,Short2LongOpenHashMap,Short2LongRBTreeMap
public abstract class AbstractShort2LongMap
extends AbstractMap<Short,Long>
implements Short2LongMap
A Base Implementation of a Type Specific Map to reduce boxing/unboxing
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classA Simple Type Specific Entry class to reduce boxing/unboxingVon Klasse geerbte verschachtelte Klassen/Schnittstellen java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.shorts.maps.interfaces.Short2LongMap
Short2LongMap.BuilderCache, Short2LongMap.Entry, Short2LongMap.FastEntrySet, Short2LongMap.MapBuilder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidA Helper method to bulk add primitives together.longcomputeLong(short key, ShortLongUnaryOperator 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".longcomputeLongIfAbsent(short key, Short2LongFunction 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".longcomputeLongIfAbsentNonDefault(short key, Short2LongFunction 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".longcomputeLongIfPresent(short key, ShortLongUnaryOperator 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".longcomputeLongIfPresentNonDefault(short key, ShortLongUnaryOperator 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".longcomputeLongNonDefault(short key, ShortLongUnaryOperator 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".booleancontainsKey(short key) Type Specific method to reduce boxing/unboxing of valuesbooleancontainsValue(long value) Type Specific method to reduce boxing/unboxing of valuescopy()A Function that does a shallow clone of the Map itself.entrySet()booleanvoidforEach(ShortLongConsumer action) Type Specific forEach method to reduce boxing/unboxinglongMethod to see what the default return value is.longgetOrDefault(short key, long defaultValue) A Type Specific getOrDefault method to reduce boxing/unboxinggetOrDefault(Object key, Long defaultValue) inthashCode()keySet()voidmergeAllLong(Short2LongMap m, LongLongUnaryOperator mappingFunction) A Bulk method for merging Maps.longmergeLong(short key, long value, LongLongUnaryOperator 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".Veraltet.voidputAll(short[] keys, long[] values, int offset, int size) Type Specific 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 performancesvoidvoidType Specific function for the bull putting of valuesvoidType-Specific bulk put method put elements into the map if not present.longreplace(short key, long value) A Type Specific replace method to reduce boxing/unboxing replace an existing valuebooleanreplace(short key, long oldValue, long newValue) A Type Specific replace method to replace an existing valuevoidreplaceLongs(ShortLongUnaryOperator mappingFunction) A Type Specific mass replace method to reduce boxing/unboxingvoidType-Specific bulk replace method.setDefaultReturnValue(long v) Method to define the default return value if a requested key isn't presentlongsupplyLongIfAbsent(short key, LongSupplier 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".longsupplyLongIfAbsentNonDefault(short key, LongSupplier 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".values()Von Klasse geerbte Methoden java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, size, toStringVon Schnittstelle geerbte Methoden speiger.src.collections.shorts.maps.interfaces.Short2LongMap
addTo, applyAsLong, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, short2LongEntrySet, subFrom, synchronize, synchronize, unmodifiable
-
Konstruktordetails
-
AbstractShort2LongMap
public AbstractShort2LongMap()
-
-
Methodendetails
-
getDefaultReturnValue
public long getDefaultReturnValue()Beschreibung aus Schnittstelle kopiert:Short2LongMapMethod to see what the default return value is.- Angegeben von:
getDefaultReturnValuein SchnittstelleShort2LongMap- Gibt zurück:
- default return value
-
setDefaultReturnValue
Beschreibung aus Schnittstelle kopiert:Short2LongMapMethod to define the default return value if a requested key isn't present- Angegeben von:
setDefaultReturnValuein SchnittstelleShort2LongMap- Parameter:
v- value that should be the default return value- Gibt zurück:
- itself
-
copy
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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- Angegeben von:
copyin SchnittstelleShort2LongMap- Gibt zurück:
- a Shallow Copy of the Map
-
put
Veraltet.- Angegeben von:
putin SchnittstelleMap<Short,Long> - Angegeben von:
putin SchnittstelleShort2LongMap- Setzt außer Kraft:
putin KlasseAbstractMap<Short,Long>
-
addToAll
Beschreibung aus Schnittstelle kopiert:Short2LongMapA Helper method to bulk add primitives together.- Angegeben von:
addToAllin SchnittstelleShort2LongMap- Parameter:
m- the values that should be added/inserted
-
putAll
Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific function for the bull putting of values- Angegeben von:
putAllin SchnittstelleShort2LongMap- Parameter:
m- the elements that should be inserted
-
putAll
-
putAll
public void putAll(short[] keys, long[] values, int offset, int size) Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific array method to bulk add elements into a map without creating a wrapper and increasing performances- Angegeben von:
putAllin SchnittstelleShort2LongMap- 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- Siehe auch:
-
putAll
Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances- Angegeben von:
putAllin SchnittstelleShort2LongMap- 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- Siehe auch:
-
putAllIfAbsent
Beschreibung aus Schnittstelle kopiert:Short2LongMapType-Specific bulk put method put elements into the map if not present.- Angegeben von:
putAllIfAbsentin SchnittstelleShort2LongMap- Parameter:
m- elements that should be added if not present.
-
containsKey
public boolean containsKey(short key) Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific method to reduce boxing/unboxing of values- Angegeben von:
containsKeyin SchnittstelleShort2LongMap- Parameter:
key- element that is searched for- Gibt zurück:
- if the key is present
-
containsValue
public boolean containsValue(long value) Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific method to reduce boxing/unboxing of values- Angegeben von:
containsValuein SchnittstelleShort2LongMap- Parameter:
value- element that is searched for- Gibt zurück:
- if the value is present
-
replace
public boolean replace(short key, long oldValue, long newValue) Beschreibung aus Schnittstelle kopiert:Short2LongMapA Type Specific replace method to replace an existing value- Angegeben von:
replacein SchnittstelleShort2LongMap- 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
-
replace
public long replace(short key, long value) Beschreibung aus Schnittstelle kopiert:Short2LongMapA Type Specific replace method to reduce boxing/unboxing replace an existing value- Angegeben von:
replacein SchnittstelleShort2LongMap- Parameter:
key- the element that should be searched forvalue- the value to replace with.- Gibt zurück:
- the present value or default return value
-
replaceLongs
Beschreibung aus Schnittstelle kopiert:Short2LongMapType-Specific bulk replace method. Could be seen as putAllIfPresent- Angegeben von:
replaceLongsin SchnittstelleShort2LongMap- Parameter:
m- elements that should be replaced.
-
replaceLongs
Beschreibung aus Schnittstelle kopiert:Short2LongMapA Type Specific mass replace method to reduce boxing/unboxing- Angegeben von:
replaceLongsin SchnittstelleShort2LongMap- Parameter:
mappingFunction- operation to replace all values
-
computeLong
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongin SchnittstelleShort2LongMap- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value- Gibt zurück:
- the result of the computation
-
computeLongIfAbsent
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongIfAbsentin SchnittstelleShort2LongMap- 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
-
supplyLongIfAbsent
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
supplyLongIfAbsentin SchnittstelleShort2LongMap- 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
-
computeLongIfPresent
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongIfPresentin SchnittstelleShort2LongMap- 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
-
computeLongNonDefault
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongNonDefaultin SchnittstelleShort2LongMap- Parameter:
key- the key that should be computedmappingFunction- the operator that should generate the value- Gibt zurück:
- the result of the computation
-
computeLongIfAbsentNonDefault
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongIfAbsentNonDefaultin SchnittstelleShort2LongMap- 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
-
supplyLongIfAbsentNonDefault
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
supplyLongIfAbsentNonDefaultin SchnittstelleShort2LongMap- 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
-
computeLongIfPresentNonDefault
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
computeLongIfPresentNonDefaultin SchnittstelleShort2LongMap- 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
-
mergeLong
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
mergeLongin SchnittstelleShort2LongMap- 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
-
mergeAllLong
Beschreibung aus Schnittstelle kopiert:Short2LongMapA 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.- Angegeben von:
mergeAllLongin SchnittstelleShort2LongMap- Parameter:
m- the entries that should be bulk addedmappingFunction- the operator that should generate the new Value
-
get
- Angegeben von:
getin SchnittstelleMap<Short,Long> - Angegeben von:
getin SchnittstelleShort2LongMap- Setzt außer Kraft:
getin KlasseAbstractMap<Short,Long>
-
getOrDefault
- Angegeben von:
getOrDefaultin SchnittstelleMap<Short,Long> - Angegeben von:
getOrDefaultin SchnittstelleShort2LongMap
-
getOrDefault
public long getOrDefault(short key, long defaultValue) Beschreibung aus Schnittstelle kopiert:Short2LongMapA Type Specific getOrDefault method to reduce boxing/unboxing- Angegeben von:
getOrDefaultin SchnittstelleShort2LongMap- 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
-
remove
- Angegeben von:
removein SchnittstelleMap<Short,Long> - Angegeben von:
removein SchnittstelleShort2LongMap- Setzt außer Kraft:
removein KlasseAbstractMap<Short,Long> - Parameter:
key- the element that should be removed- Gibt zurück:
- the value that was removed or default return value
- Siehe auch:
-
forEach
Beschreibung aus Schnittstelle kopiert:Short2LongMapType Specific forEach method to reduce boxing/unboxing- Angegeben von:
forEachin SchnittstelleShort2LongMap- Parameter:
action- processor of the values that are iterator over
-
keySet
- Angegeben von:
keySetin SchnittstelleMap<Short,Long> - Angegeben von:
keySetin SchnittstelleShort2LongMap- Setzt außer Kraft:
keySetin KlasseAbstractMap<Short,Long>
-
values
- Angegeben von:
valuesin SchnittstelleMap<Short,Long> - Angegeben von:
valuesin SchnittstelleShort2LongMap- Setzt außer Kraft:
valuesin KlasseAbstractMap<Short,Long>
-
entrySet
- Angegeben von:
entrySetin SchnittstelleMap<Short,Long> - Angegeben von:
entrySetin SchnittstelleShort2LongMap- Angegeben von:
entrySetin KlasseAbstractMap<Short,Long>
-
equals
-
hashCode
public int hashCode()
-