T - the type of elements maintained by this Collectionpublic class LinkedEnum2ShortMap<T extends java.lang.Enum<T>> extends Enum2ShortMap<T> implements Object2ShortOrderedMap<T>
AbstractObject2ShortMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ShortOrderedMap.FastOrderedSet<T>Object2ShortMap.BuilderCache<T>, Object2ShortMap.Entry<T>, Object2ShortMap.FastEntrySet<T>, Object2ShortMap.MapBuilder| Constructor and Description |
|---|
LinkedEnum2ShortMap(java.lang.Class<T> keyType)
Default Constructor
|
LinkedEnum2ShortMap(java.util.Map<? extends T,? extends java.lang.Short> map)
A Helper constructor that allows to create a EnumMap with exactly the same values as the provided map.
|
LinkedEnum2ShortMap(Object2ShortMap<T> map)
A Type Specific Helper function that allows to create a new EnumMap with exactly the same values as the provided map.
|
LinkedEnum2ShortMap(T[] keys,
short[] values)
Helper constructor that allow to create a EnumMap from unboxed values
|
LinkedEnum2ShortMap(T[] keys,
java.lang.Short[] values)
Helper constructor that allow to create a EnumMap from boxed values (it will unbox them)
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
LinkedEnum2ShortMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
T |
firstKey()
A method to get the first Key of a Map.
|
short |
firstShortValue()
A method to get the first Value of a Map.
|
void |
forEach(ObjectShortConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
getAndMoveToFirst(T key)
A Specific get method that allows to move teh given key/value int the first index.
|
short |
getAndMoveToLast(T key)
A Specific get method that allows to move teh given key/value int the last index.
|
ObjectOrderedSet<T> |
keySet() |
T |
lastKey()
A method to get the last Key of a Map.
|
short |
lastShortValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(T key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(T key)
A specific move method to move a given key/value to the last index.
|
ObjectOrderedSet<Object2ShortMap.Entry<T>> |
object2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
T |
pollLastKey()
A method to get and remove the last Key of a Map.
|
short |
putAndMoveToFirst(T key,
short value)
A customized put method that allows you to insert into the first index.
|
short |
putAndMoveToLast(T key,
short value)
A customized put method that allows you to insert into the last index.
|
ShortCollection |
values() |
addTo, computeShort, computeShortIfAbsent, computeShortIfPresent, containsKey, containsValue, getOrDefault, getShort, mergeAllShort, mergeShort, put, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, size, subFrom, supplyShortIfAbsentaddToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceShorts, replaceShorts, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddTo, addToAll, builder, compute, computeIfAbsent, computeIfPresent, computeShort, computeShortIfAbsent, computeShortIfPresent, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, getOrDefault, getShort, merge, mergeAllShort, mergeShort, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, remove, replace, replace, replace, replace, replaceAll, replaceShorts, replaceShorts, setDefaultReturnValue, subFrom, supplyShortIfAbsentpublic LinkedEnum2ShortMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic LinkedEnum2ShortMap(T[] keys, java.lang.Short[] values)
keys - the keys that should be put into the EnumMapvalues - the values that should be put into the EnumMap.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic LinkedEnum2ShortMap(T[] keys, short[] 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 LinkedEnum2ShortMap(java.util.Map<? extends T,? extends java.lang.Short> map)
map - the values that should be present in the mappublic LinkedEnum2ShortMap(Object2ShortMap<T> map)
map - the values that should be present in the mappublic short putAndMoveToFirst(T key, short value)
Object2ShortOrderedMapputAndMoveToFirst in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public short putAndMoveToLast(T key, short value)
Object2ShortOrderedMapputAndMoveToLast in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2ShortOrderedMapmoveToFirst in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2ShortOrderedMapmoveToLast in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - that should be moved to the first lastpublic short getAndMoveToFirst(T key)
Object2ShortOrderedMapgetAndMoveToFirst in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - that is searched forpublic short getAndMoveToLast(T key)
Object2ShortOrderedMapgetAndMoveToLast in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>key - that is searched forpublic LinkedEnum2ShortMap<T> copy()
Object2ShortMapcopy in interface Object2ShortMap<T extends java.lang.Enum<T>>copy in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>copy in class Enum2ShortMap<T extends java.lang.Enum<T>>public T firstKey()
Object2ShortOrderedMapfirstKey in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public T pollFirstKey()
Object2ShortOrderedMappollFirstKey in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public T lastKey()
Object2ShortOrderedMaplastKey in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public T pollLastKey()
Object2ShortOrderedMappollLastKey in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public short firstShortValue()
Object2ShortOrderedMapfirstShortValue in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public short lastShortValue()
Object2ShortOrderedMaplastShortValue in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>public ObjectOrderedSet<Object2ShortMap.Entry<T>> object2ShortEntrySet()
Object2ShortMapobject2ShortEntrySet in interface Object2ShortMap<T extends java.lang.Enum<T>>object2ShortEntrySet in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>object2ShortEntrySet in class Enum2ShortMap<T extends java.lang.Enum<T>>public ObjectOrderedSet<T> keySet()
keySet in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Short>keySet in interface Object2ShortMap<T extends java.lang.Enum<T>>keySet in interface Object2ShortOrderedMap<T extends java.lang.Enum<T>>keySet in class Enum2ShortMap<T extends java.lang.Enum<T>>public ShortCollection values()
values in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Short>values in interface Object2ShortMap<T extends java.lang.Enum<T>>values in class Enum2ShortMap<T extends java.lang.Enum<T>>public void forEach(ObjectShortConsumer<T> action)
Object2ShortMapforEach in interface Object2ShortMap<T extends java.lang.Enum<T>>forEach in class Enum2ShortMap<T extends java.lang.Enum<T>>action - processor of the values that are iterator over