Class Object2IntBiMap<T>
java.lang.Object
org.geysermc.geyser.util.collection.Object2IntBiMap<T>
- Type Parameters:
T
- the value
- All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<T,Integer>
,it.unimi.dsi.fastutil.objects.Object2IntFunction<T>
,it.unimi.dsi.fastutil.objects.Object2IntMap<T>
,Function<T,Integer>
,ToIntFunction<T>
,Map<T,Integer>
public class Object2IntBiMap<T>
extends Object
implements it.unimi.dsi.fastutil.objects.Object2IntMap<T>
A primitive int BiMap implementation built around fastutil to
reduce boxing and the memory footprint. Protocol has a
Int2ObjectBiMap
class, but it
does not extend the Map interface making it difficult to utilize
it in for loops and the registry system.-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionObject2IntBiMap(int expected)
Object2IntBiMap(int expected, float loadFactor)
Object2IntBiMap(int expected, float loadFactor, int defaultBackwardsValue)
Object2IntBiMap(int expected, float loadFactor, T defaultForwardsValue, int defaultBackwardsValue)
Object2IntBiMap(T defaultForwardsValue)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey(Object o)
boolean
containsValue(int i)
int
void
defaultReturnValue(int i)
void
defaultReturnValue(T v)
boolean
get(int key)
int
getOrDefault(int key, T defaultValue)
int
getOrDefault(Object key, int defaultValue)
int
hashCode()
it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry<T>>
boolean
isEmpty()
it.unimi.dsi.fastutil.objects.ObjectSet<T>
keySet()
it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<T>>
int
void
int
int
size()
toString()
it.unimi.dsi.fastutil.ints.IntCollection
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.unimi.dsi.fastutil.Function
apply
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, replaceAll
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2IntFunction
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsInt, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2IntMap
clear, computeIfAbsent, computeIfAbsent, computeInt, computeIntIfAbsent, computeIntIfAbsentPartial, computeIntIfPresent, containsValue, entrySet, forEach, get, getOrDefault, merge, merge, mergeInt, mergeInt, mergeInt, put, putIfAbsent, putIfAbsent, remove, remove, remove, replace, replace, replace, replace
-
Constructor Details
-
Object2IntBiMap
public Object2IntBiMap() -
Object2IntBiMap
public Object2IntBiMap(int expected) -
Object2IntBiMap
-
Object2IntBiMap
public Object2IntBiMap(int expected, float loadFactor) -
Object2IntBiMap
public Object2IntBiMap(int expected, float loadFactor, int defaultBackwardsValue) -
Object2IntBiMap
public Object2IntBiMap(int expected, float loadFactor, T defaultForwardsValue, int defaultBackwardsValue)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getInt
- Specified by:
getInt
in interfaceit.unimi.dsi.fastutil.objects.Object2IntFunction<T>
-
get
-
getOrDefault
-
getOrDefault
-
defaultReturnValue
public void defaultReturnValue(int i) -
defaultReturnValue
-
defaultReturnValue
public int defaultReturnValue() -
backwardsDefaultReturnValue
-
object2IntEntrySet
public it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<T>> object2IntEntrySet()- Specified by:
object2IntEntrySet
in interfaceit.unimi.dsi.fastutil.objects.Object2IntMap<T>
-
int2ObjectEntrySet
public it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry<T>> int2ObjectEntrySet() -
keySet
-
values
public it.unimi.dsi.fastutil.ints.IntCollection values() -
containsKey
-
containsValue
public boolean containsValue(int i)- Specified by:
containsValue
in interfaceit.unimi.dsi.fastutil.objects.Object2IntMap<T>
-
put
- Specified by:
put
in interfaceit.unimi.dsi.fastutil.objects.Object2IntFunction<T>
-
putAll
-
removeInt
- Specified by:
removeInt
in interfaceit.unimi.dsi.fastutil.objects.Object2IntFunction<T>
-
hashCode
public int hashCode() -
toString
-
equals
-