Package com.almworks.integers.wrappers
Class IntObjHppcOpenHashMap<T>
java.lang.Object
com.almworks.integers.AbstractWritableIntObjMap<T>
com.almworks.integers.wrappers.IntObjHppcOpenHashMap<T>
- All Implemented Interfaces:
com.almworks.integers.IntObjIterable<T>,com.almworks.integers.IntObjMap<T>,com.almworks.integers.WritableIntObjMap<T>,Iterable<com.almworks.integers.IntObjIterator<T>>
public class IntObjHppcOpenHashMap<T>
extends com.almworks.integers.AbstractWritableIntObjMap<T>
-
Field Summary
FieldsFields inherited from class com.almworks.integers.AbstractWritableIntObjMap
myModCountFields inherited from interface com.almworks.integers.IntObjMap
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionIntObjHppcOpenHashMap(int initialCapacity) IntObjHppcOpenHashMap(int initialCapacity, float loadFactor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(int key) static <T> IntObjHppcOpenHashMap<T>createForAdd(int count) Creates new hashmap with default load factorstatic <T> IntObjHppcOpenHashMap<T>createForAdd(int count, float loadFactor) Creates new hashmap with the specified load factor that is garanteed to not invokeresizeafter addingcountelementsstatic <T> IntObjHppcOpenHashMap<T>createFrom(int[] keys, T[] values) static <T> IntObjHppcOpenHashMap<T>createFrom(com.almworks.integers.IntIterable keys, Iterable<T> values) get(int key) @NotNull com.almworks.integers.IntObjIterator<T>iterator()com.almworks.integers.IntIteratorlget()Returns the last value saved in a call tocontainsKey(int).Sets the value corresponding to the key saved in the last call tocontainsKey(int), if and only if the key exists in the map already.intlslot()protected Tbooleanprotected TremoveImpl(int key) intsize()values()Methods inherited from class com.almworks.integers.AbstractWritableIntObjMap
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
-
IntObjHppcOpenHashMap
public IntObjHppcOpenHashMap() -
IntObjHppcOpenHashMap
public IntObjHppcOpenHashMap(int initialCapacity) -
IntObjHppcOpenHashMap
public IntObjHppcOpenHashMap(int initialCapacity, float loadFactor)
-
-
Method Details
-
createFrom
public static <T> IntObjHppcOpenHashMap<T> createFrom(com.almworks.integers.IntIterable 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(int key) -
size
public int size() -
iterator
-
keysIterator
public com.almworks.integers.IntIterator keysIterator() -
valuesIterator
-
values
-
get
-
clear
public void clear() -
putImpl
- Specified by:
putImplin classcom.almworks.integers.AbstractWritableIntObjMap<T>
-
lget
Returns the last value saved in a call tocontainsKey(int).- See Also:
-
lset
Sets the value corresponding to the key saved in the last call tocontainsKey(int), 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(int)if it returnedtrue. - See Also:
-
removeImpl
- Specified by:
removeImplin classcom.almworks.integers.AbstractWritableIntObjMap<T>
-
remove
-