public class Long2IntLinkedOpenCustomHashMap extends Long2IntOpenCustomHashMap implements Long2IntSortedMap
AbstractLong2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2IntSortedMap.FastSortedSetLong2IntMap.Entry, Long2IntMap.FastEntrySet| Constructor and Description |
|---|
Long2IntLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
LongStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Long2IntLinkedOpenCustomHashMap(int minCapacity,
LongStrategy strategy)
Constructor that defines the minimum capacity
|
Long2IntLinkedOpenCustomHashMap(long[] keys,
int[] values,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Long2IntLinkedOpenCustomHashMap(long[] keys,
int[] values,
LongStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Long2IntLinkedOpenCustomHashMap(java.lang.Long[] keys,
java.lang.Integer[] values,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2IntLinkedOpenCustomHashMap(java.lang.Long[] keys,
java.lang.Integer[] values,
LongStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2IntLinkedOpenCustomHashMap(Long2IntMap map,
float loadFactor,
LongStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenCustomHashMap(Long2IntMap map,
LongStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenCustomHashMap(LongStrategy strategy)
Default Constructor
|
Long2IntLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map,
LongStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
LongComparator |
comparator() |
int |
firstIntValue()
A method to get the first Value of a Map.
|
long |
firstLongKey()
A method to get the first Key of a Map.
|
void |
forEach(LongIntConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
int |
getAndMoveToFirst(long key)
A Specific get method that allows to move teh given key/value int the first index.
|
int |
getAndMoveToLast(long key)
A Specific get method that allows to move teh given key/value int the last index.
|
Long2IntSortedMap |
headMap(long toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
LongSet |
keySet() |
int |
lastIntValue()
A method to get the last Value of a Map.
|
long |
lastLongKey()
A method to get the last Key of a Map.
|
ObjectSet<Long2IntMap.Entry> |
long2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
boolean |
moveToFirst(long key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(long key)
A specific move method to move a given key/value to the last index.
|
long |
pollFirstLongKey()
A method to get and remove the first Key of a Map.
|
long |
pollLastLongKey()
A method to get and remove the last Key of a Map.
|
int |
putAndMoveToFirst(long key,
int value)
A customized put method that allows you to insert into the first index.
|
int |
putAndMoveToLast(long key,
int value)
A customized put method that allows you to insert into the last index.
|
Long2IntSortedMap |
subMap(long fromKey,
long toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Long2IntSortedMap |
tailMap(long fromKey)
A Type Specific TailMap method to reduce boxing/unboxing
|
IntCollection |
values() |
addTo, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsKey, containsValue, containsValue, get, getInt, getOrDefault, mergeAllInt, mergeInt, put, putIfAbsent, remLong, remLongOrDefault, remove, remove, remove, replace, replace, sizeaddToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceInts, replaceInts, setDefaultReturnValuefirstKey, headMap, lastKey, subMap, tailMapaddTo, addToAll, compute, computeIfAbsent, computeIfPresent, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getInt, getOrDefault, getOrDefault, merge, mergeAllInt, mergeInt, put, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remLong, remLongOrDefault, remove, remove, remove, replace, replace, replace, replace, replaceAll, replaceInts, replaceInts, setDefaultReturnValueapplyAsIntpublic Long2IntLinkedOpenCustomHashMap(LongStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Long2IntLinkedOpenCustomHashMap(int minCapacity,
LongStrategy strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic Long2IntLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
LongStrategy strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Long2IntLinkedOpenCustomHashMap(java.lang.Long[] keys,
java.lang.Integer[] values,
LongStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Long2IntLinkedOpenCustomHashMap(java.lang.Long[] keys,
java.lang.Integer[] values,
float loadFactor,
LongStrategy strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 Long2IntLinkedOpenCustomHashMap(long[] keys,
int[] values,
LongStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Long2IntLinkedOpenCustomHashMap(long[] keys,
int[] values,
float loadFactor,
LongStrategy strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 Long2IntLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map,
LongStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Long2IntLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map,
float loadFactor,
LongStrategy strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Long2IntLinkedOpenCustomHashMap(Long2IntMap map, LongStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Long2IntLinkedOpenCustomHashMap(Long2IntMap map, float loadFactor, LongStrategy strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public int putAndMoveToFirst(long key,
int value)
Long2IntSortedMapputAndMoveToFirst in interface Long2IntSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public int putAndMoveToLast(long key,
int value)
Long2IntSortedMapputAndMoveToLast in interface Long2IntSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(long key)
Long2IntSortedMapmoveToFirst in interface Long2IntSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(long key)
Long2IntSortedMapmoveToLast in interface Long2IntSortedMapkey - that should be moved to the first lastpublic int getAndMoveToFirst(long key)
Long2IntSortedMapgetAndMoveToFirst in interface Long2IntSortedMapkey - that is searched forpublic int getAndMoveToLast(long key)
Long2IntSortedMapgetAndMoveToLast in interface Long2IntSortedMapkey - that is searched forpublic LongComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Long,java.lang.Integer>comparator in interface Long2IntSortedMappublic Long2IntSortedMap subMap(long fromKey, long toKey)
Long2IntSortedMapsubMap in interface Long2IntSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Long2IntSortedMap headMap(long toKey)
Long2IntSortedMapheadMap in interface Long2IntSortedMaptoKey - where the headMap should endpublic Long2IntSortedMap tailMap(long fromKey)
Long2IntSortedMaptailMap in interface Long2IntSortedMapfromKey - where the TailMap should startpublic long firstLongKey()
Long2IntSortedMapfirstLongKey in interface Long2IntSortedMappublic long pollFirstLongKey()
Long2IntSortedMappollFirstLongKey in interface Long2IntSortedMappublic long lastLongKey()
Long2IntSortedMaplastLongKey in interface Long2IntSortedMappublic long pollLastLongKey()
Long2IntSortedMappollLastLongKey in interface Long2IntSortedMappublic int firstIntValue()
Long2IntSortedMapfirstIntValue in interface Long2IntSortedMappublic int lastIntValue()
Long2IntSortedMaplastIntValue in interface Long2IntSortedMappublic ObjectSet<Long2IntMap.Entry> long2IntEntrySet()
Long2IntMaplong2IntEntrySet in interface Long2IntMaplong2IntEntrySet in class Long2IntOpenCustomHashMappublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Integer>keySet in interface java.util.SortedMap<java.lang.Long,java.lang.Integer>keySet in interface Long2IntMapkeySet in interface Long2IntSortedMapkeySet in class Long2IntOpenCustomHashMappublic IntCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Integer>values in interface java.util.SortedMap<java.lang.Long,java.lang.Integer>values in interface Long2IntMapvalues in interface Long2IntSortedMapvalues in class Long2IntOpenCustomHashMappublic void forEach(LongIntConsumer action)
Long2IntMapforEach in interface Long2IntMapforEach in class Long2IntOpenCustomHashMapaction - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Integer>clear in class Long2IntOpenCustomHashMap