Package co.aikar.util
Class LoadingIntMap<V>
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractInt2ObjectFunction<V>
it.unimi.dsi.fastutil.ints.AbstractInt2ObjectMap<V>
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<V>
co.aikar.util.LoadingIntMap<V>
- Type Parameters:
V
- Value
- All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<Integer,
,V> it.unimi.dsi.fastutil.Hash
,it.unimi.dsi.fastutil.ints.Int2ObjectFunction<V>
,it.unimi.dsi.fastutil.ints.Int2ObjectMap<V>
,Serializable
,Cloneable
,Function<Integer,
,V> IntFunction<V>
,Map<Integer,
V>
@Deprecated(forRemoval=true)
public class LoadingIntMap<V>
extends it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<V>
Deprecated, for removal: This API element is subject to removal in a future version.
Allows you to pass a Loader function that when a key is accessed that doesn't exist,
automatically loads the entry into the map by calling the loader Function.
.get() Will only return null if the Loader can return null.
You may pass any backing Map to use.
This class is not thread safe and should be wrapped with Collections.synchronizedMap on the OUTSIDE of the LoadingMap if needed.
Do not wrap the backing map with Collections.synchronizedMap.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version.Due to java stuff, you will need to cast it to (Function) for some casesNested classes/interfaces inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2ObjectMap
it.unimi.dsi.fastutil.ints.AbstractInt2ObjectMap.BasicEntry<V>, it.unimi.dsi.fastutil.ints.AbstractInt2ObjectMap.BasicEntrySet<V>
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.Hash
it.unimi.dsi.fastutil.Hash.Strategy<K>
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.ints.Int2ObjectMap
it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry<V>, it.unimi.dsi.fastutil.ints.Int2ObjectMap.FastEntrySet<V>
-
Field Summary
Fields inherited from class it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
containsNullKey, entries, f, key, keys, mask, maxFill, minN, n, size, value, values
Fields inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2ObjectFunction
defRetValue
Fields inherited from interface it.unimi.dsi.fastutil.Hash
DEFAULT_GROWTH_FACTOR, DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR, FAST_LOAD_FACTOR, FREE, OCCUPIED, PRIMES, REMOVED, VERY_FAST_LOAD_FACTOR
-
Constructor Summary
ConstructorDescriptionLoadingIntMap
(int expectedSize, float loadFactor, @NotNull Function<Integer, V> loader) Deprecated, for removal: This API element is subject to removal in a future version.LoadingIntMap
(int expectedSize, @NotNull Function<Integer, V> loader) Deprecated, for removal: This API element is subject to removal in a future version.LoadingIntMap
(@NotNull Function<Integer, V> loader) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
clear, clone, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, containsKey, containsValue, ensureCapacity, getOrDefault, hashCode, int2ObjectEntrySet, isEmpty, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, shiftKeys, size, trim, trim, values
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2ObjectMap
equals, toString
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2ObjectFunction
defaultReturnValue, defaultReturnValue
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.unimi.dsi.fastutil.Function
apply
Methods inherited from interface it.unimi.dsi.fastutil.ints.Int2ObjectFunction
andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, apply, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort
Methods inherited from interface it.unimi.dsi.fastutil.ints.Int2ObjectMap
computeIfAbsentPartial, containsKey, defaultReturnValue, defaultReturnValue, entrySet, forEach, get, getOrDefault, put, remove
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
LoadingIntMap
Deprecated, for removal: This API element is subject to removal in a future version. -
LoadingIntMap
Deprecated, for removal: This API element is subject to removal in a future version. -
LoadingIntMap
public LoadingIntMap(int expectedSize, float loadFactor, @NotNull @NotNull Function<Integer, V> loader) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details