Package com.almworks.integers.wrappers
Class LongObjHppcOpenHashMap<T>
java.lang.Object
com.almworks.integers.AbstractWritableLongObjMap<T>
com.almworks.integers.wrappers.LongObjHppcOpenHashMap<T>
- All Implemented Interfaces:
com.almworks.integers.LongObjIterable<T>,com.almworks.integers.LongObjMap<T>,com.almworks.integers.WritableLongObjMap<T>,Iterable<com.almworks.integers.LongObjIterator<T>>
public class LongObjHppcOpenHashMap<T>
extends com.almworks.integers.AbstractWritableLongObjMap<T>
-
Field Summary
FieldsFields inherited from class com.almworks.integers.AbstractWritableLongObjMap
myModCountFields inherited from interface com.almworks.integers.LongObjMap
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionLongObjHppcOpenHashMap(int initialCapacity) LongObjHppcOpenHashMap(int initialCapacity, float loadFactor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(long key) static <T> LongObjHppcOpenHashMap<T>createForAdd(int count) Creates new hashmap with default load factorstatic <T> LongObjHppcOpenHashMap<T>createForAdd(int count, float loadFactor) Creates new hashmap with the specified load factor that is garanteed to not invokeresizeafter addingcountelementsstatic <T> LongObjHppcOpenHashMap<T>createFrom(long[] keys, T[] values) static <T> LongObjHppcOpenHashMap<T>createFrom(com.almworks.integers.LongIterable keys, Iterable<T> values) get(long key) @NotNull com.almworks.integers.LongObjIterator<T>iterator()com.almworks.integers.LongIteratorlget()Returns the last value saved in a call tocontainsKey(long).Sets the value corresponding to the key saved in the last call tocontainsKey(long), if and only if the key exists in the map already.intlslot()protected Tbooleanprotected TremoveImpl(long key) intsize()values()Methods inherited from class com.almworks.integers.AbstractWritableLongObjMap
add, containsAnyKeys, containsKeys, equals, hashCode, isEmpty, keySet, modified, put, putAll, putAll, putAll, putAllKeys, putIfAbsent, remove, removeAll, removeAll, toString, toString, toTableStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
myMap
-
-
Constructor Details
-
LongObjHppcOpenHashMap
public LongObjHppcOpenHashMap() -
LongObjHppcOpenHashMap
public LongObjHppcOpenHashMap(int initialCapacity) -
LongObjHppcOpenHashMap
public LongObjHppcOpenHashMap(int initialCapacity, float loadFactor)
-
-
Method Details
-
createFrom
public static <T> LongObjHppcOpenHashMap<T> createFrom(com.almworks.integers.LongIterable keys, Iterable<T> values) -
createFrom
-
createForAdd
Creates new hashmap with the specified load factor that is garanteed to not invokeresizeafter addingcountelements- Returns:
- new hashmap with the specified capacity dependent on
countandloadFactor
-
createForAdd
Creates new hashmap with default load factor- See Also:
-
containsKey
public boolean containsKey(long key) -
size
public int size() -
iterator
-
keysIterator
public com.almworks.integers.LongIterator keysIterator() -
valuesIterator
-
values
-
get
-
clear
public void clear() -
putImpl
- Specified by:
putImplin classcom.almworks.integers.AbstractWritableLongObjMap<T>
-
lget
Returns the last value saved in a call tocontainsKey(long).- See Also:
-
lset
Sets the value corresponding to the key saved in the last call tocontainsKey(long), if and only if the key exists in the map already.- Returns:
- Returns the previous value stored under the given key
or
nullif there was no mapping for the last used key - See Also:
-
lslot
public int lslot()- Returns:
- Returns the slot of the last key looked up in a call to
containsKey(long)if it returnedtrue. - See Also:
-
removeImpl
- Specified by:
removeImplin classcom.almworks.integers.AbstractWritableLongObjMap<T>
-
remove
-