public class Short2LongLinkedOpenHashMap extends Short2LongOpenHashMap implements Short2LongOrderedMap
AbstractShort2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2LongOrderedMap.FastOrderedSetShort2LongMap.BuilderCache, Short2LongMap.Entry, Short2LongMap.FastEntrySet, Short2LongMap.MapBuilder| Constructor and Description |
|---|
Short2LongLinkedOpenHashMap()
Default Constructor
|
Short2LongLinkedOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Short2LongLinkedOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Short2LongLinkedOpenHashMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2LongLinkedOpenHashMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2LongLinkedOpenHashMap(short[] keys,
long[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2LongLinkedOpenHashMap(java.lang.Short[] keys,
java.lang.Long[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2LongLinkedOpenHashMap(short[] keys,
long[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Short2LongLinkedOpenHashMap(java.lang.Short[] keys,
java.lang.Long[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2LongLinkedOpenHashMap(Short2LongMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2LongLinkedOpenHashMap(Short2LongMap map,
float loadFactor)
A Type Specific Helper function that allows to create a new 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(long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Short2LongLinkedOpenHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
firstLongValue()
A method to get the first Value of a Map.
|
short |
firstShortKey()
A method to get the first Key of a Map.
|
void |
forEach(ShortLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
getAndMoveToFirst(short key)
A Specific get method that allows to move teh given key/value int the first index.
|
long |
getAndMoveToLast(short key)
A Specific get method that allows to move teh given key/value int the last index.
|
ShortOrderedSet |
keySet() |
long |
lastLongValue()
A method to get the last Value of a Map.
|
short |
lastShortKey()
A method to get the last Key of a Map.
|
boolean |
moveToFirst(short key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(short key)
A specific move method to move a given key/value to the last index.
|
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
long |
putAndMoveToFirst(short key,
long value)
A customized put method that allows you to insert into the first index.
|
long |
putAndMoveToLast(short key,
long value)
A customized put method that allows you to insert into the last index.
|
ObjectOrderedSet<Short2LongMap.Entry> |
short2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
LongCollection |
values() |
addTo, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsKey, get, get, getOrDefault, mergeAllLong, mergeLong, put, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, size, subFrom, supplyLongIfAbsent, trimaddToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceLongs, replaceLongs, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddTo, addToAll, applyAsLong, builder, compute, computeIfAbsent, computeIfPresent, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsKey, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, mergeAllLong, mergeLong, put, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, replace, replace, replaceAll, replaceLongs, replaceLongs, setDefaultReturnValue, subFrom, supplyLongIfAbsentclearAndTrim, trimpublic Short2LongLinkedOpenHashMap()
public Short2LongLinkedOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Short2LongLinkedOpenHashMap(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 Short2LongLinkedOpenHashMap(java.lang.Short[] keys,
java.lang.Long[] 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 Short2LongLinkedOpenHashMap(java.lang.Short[] keys,
java.lang.Long[] 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 Short2LongLinkedOpenHashMap(short[] keys,
long[] 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 Short2LongLinkedOpenHashMap(short[] keys,
long[] 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 Short2LongLinkedOpenHashMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> map)
map - the values that should be present in the mappublic Short2LongLinkedOpenHashMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> 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 Short2LongLinkedOpenHashMap(Short2LongMap map)
map - the values that should be present in the mappublic Short2LongLinkedOpenHashMap(Short2LongMap 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 long putAndMoveToFirst(short key,
long value)
Short2LongOrderedMapputAndMoveToFirst in interface Short2LongOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public long putAndMoveToLast(short key,
long value)
Short2LongOrderedMapputAndMoveToLast in interface Short2LongOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(short key)
Short2LongOrderedMapmoveToFirst in interface Short2LongOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(short key)
Short2LongOrderedMapmoveToLast in interface Short2LongOrderedMapkey - that should be moved to the first lastpublic long getAndMoveToFirst(short key)
Short2LongOrderedMapgetAndMoveToFirst in interface Short2LongOrderedMapkey - that is searched forpublic long getAndMoveToLast(short key)
Short2LongOrderedMapgetAndMoveToLast in interface Short2LongOrderedMapkey - that is searched forpublic boolean containsValue(long value)
Short2LongMapcontainsValue in interface Short2LongMapcontainsValue in class Short2LongOpenHashMapvalue - element that is searched for@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Short,java.lang.Long>containsValue in interface Short2LongMapcontainsValue in class Short2LongOpenHashMapvalue - that is searched for.Map.containsValue(Object)public Short2LongLinkedOpenHashMap copy()
Short2LongMapcopy in interface Short2LongMapcopy in interface Short2LongOrderedMapcopy in class Short2LongOpenHashMappublic short firstShortKey()
Short2LongOrderedMapfirstShortKey in interface Short2LongOrderedMappublic short pollFirstShortKey()
Short2LongOrderedMappollFirstShortKey in interface Short2LongOrderedMappublic short lastShortKey()
Short2LongOrderedMaplastShortKey in interface Short2LongOrderedMappublic short pollLastShortKey()
Short2LongOrderedMappollLastShortKey in interface Short2LongOrderedMappublic long firstLongValue()
Short2LongOrderedMapfirstLongValue in interface Short2LongOrderedMappublic long lastLongValue()
Short2LongOrderedMaplastLongValue in interface Short2LongOrderedMappublic ObjectOrderedSet<Short2LongMap.Entry> short2LongEntrySet()
Short2LongMapshort2LongEntrySet in interface Short2LongMapshort2LongEntrySet in interface Short2LongOrderedMapshort2LongEntrySet in class Short2LongOpenHashMappublic ShortOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Long>keySet in interface Short2LongMapkeySet in interface Short2LongOrderedMapkeySet in class Short2LongOpenHashMappublic LongCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Long>values in interface Short2LongMapvalues in class Short2LongOpenHashMappublic void forEach(ShortLongConsumer action)
Short2LongMapforEach in interface Short2LongMapforEach in class Short2LongOpenHashMapaction - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Long>clear in class Short2LongOpenHashMappublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Short2LongOpenHashMapsize - the amount of elements that should be allowed