public class Long2IntLinkedOpenHashMap extends Long2IntOpenHashMap implements Long2IntOrderedMap
AbstractLong2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2IntOrderedMap.FastOrderedSetLong2IntMap.BuilderCache, Long2IntMap.Entry, Long2IntMap.FastEntrySet, Long2IntMap.MapBuilder| Constructor and Description |
|---|
Long2IntLinkedOpenHashMap()
Default Constructor
|
Long2IntLinkedOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Long2IntLinkedOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Long2IntLinkedOpenHashMap(long[] keys,
int[] values)
Helper constructor that allow to create a map from unboxed values
|
Long2IntLinkedOpenHashMap(long[] keys,
int[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Long2IntLinkedOpenHashMap(java.lang.Long[] keys,
java.lang.Integer[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2IntLinkedOpenHashMap(java.lang.Long[] keys,
java.lang.Integer[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2IntLinkedOpenHashMap(Long2IntMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenHashMap(Long2IntMap map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Long2IntLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> 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 |
|---|---|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
containsValue(int value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Long2IntLinkedOpenHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
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.
|
LongOrderedSet |
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.
|
ObjectOrderedSet<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.
|
IntCollection |
values() |
addTo, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsKey, get, get, getOrDefault, mergeAllInt, mergeInt, put, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, size, subFrom, supplyIntIfAbsent, trimaddToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceInts, replaceInts, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddTo, addToAll, applyAsInt, builder, compute, computeIfAbsent, computeIfPresent, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsKey, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, mergeAllInt, mergeInt, put, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, replace, replace, replaceAll, replaceInts, replaceInts, setDefaultReturnValue, subFrom, supplyIntIfAbsentclearAndTrim, trimpublic Long2IntLinkedOpenHashMap()
public Long2IntLinkedOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Long2IntLinkedOpenHashMap(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Long2IntLinkedOpenHashMap(java.lang.Long[] keys,
java.lang.Integer[] 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 Long2IntLinkedOpenHashMap(java.lang.Long[] keys,
java.lang.Integer[] 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 Long2IntLinkedOpenHashMap(long[] keys,
int[] 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 Long2IntLinkedOpenHashMap(long[] keys,
int[] 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 Long2IntLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> map)
map - the values that should be present in the mappublic Long2IntLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Integer> 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 Long2IntLinkedOpenHashMap(Long2IntMap map)
map - the values that should be present in the mappublic Long2IntLinkedOpenHashMap(Long2IntMap 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 int putAndMoveToFirst(long key,
int value)
Long2IntOrderedMapputAndMoveToFirst in interface Long2IntOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public int putAndMoveToLast(long key,
int value)
Long2IntOrderedMapputAndMoveToLast in interface Long2IntOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(long key)
Long2IntOrderedMapmoveToFirst in interface Long2IntOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(long key)
Long2IntOrderedMapmoveToLast in interface Long2IntOrderedMapkey - that should be moved to the first lastpublic int getAndMoveToFirst(long key)
Long2IntOrderedMapgetAndMoveToFirst in interface Long2IntOrderedMapkey - that is searched forpublic int getAndMoveToLast(long key)
Long2IntOrderedMapgetAndMoveToLast in interface Long2IntOrderedMapkey - that is searched forpublic boolean containsValue(int value)
Long2IntMapcontainsValue in interface Long2IntMapcontainsValue in class Long2IntOpenHashMapvalue - element that is searched for@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Integer>containsValue in interface Long2IntMapcontainsValue in class Long2IntOpenHashMapvalue - that is searched for.Map.containsValue(Object)public Long2IntLinkedOpenHashMap copy()
Long2IntMapcopy in interface Long2IntMapcopy in interface Long2IntOrderedMapcopy in class Long2IntOpenHashMappublic long firstLongKey()
Long2IntOrderedMapfirstLongKey in interface Long2IntOrderedMappublic long pollFirstLongKey()
Long2IntOrderedMappollFirstLongKey in interface Long2IntOrderedMappublic long lastLongKey()
Long2IntOrderedMaplastLongKey in interface Long2IntOrderedMappublic long pollLastLongKey()
Long2IntOrderedMappollLastLongKey in interface Long2IntOrderedMappublic int firstIntValue()
Long2IntOrderedMapfirstIntValue in interface Long2IntOrderedMappublic int lastIntValue()
Long2IntOrderedMaplastIntValue in interface Long2IntOrderedMappublic ObjectOrderedSet<Long2IntMap.Entry> long2IntEntrySet()
Long2IntMaplong2IntEntrySet in interface Long2IntMaplong2IntEntrySet in interface Long2IntOrderedMaplong2IntEntrySet in class Long2IntOpenHashMappublic LongOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Integer>keySet in interface Long2IntMapkeySet in interface Long2IntOrderedMapkeySet in class Long2IntOpenHashMappublic IntCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Integer>values in interface Long2IntMapvalues in class Long2IntOpenHashMappublic void forEach(LongIntConsumer action)
Long2IntMapforEach in interface Long2IntMapforEach in class Long2IntOpenHashMapaction - 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 Long2IntOpenHashMappublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Long2IntOpenHashMapsize - the amount of elements that should be allowed