Package net.minecraft.util
Class CrudeIncrementalIntIdentityHashBiMap<K>
java.lang.Object
net.minecraft.util.CrudeIncrementalIntIdentityHashBiMap<K>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CrudeIncrementalIntIdentityHashBiMap
(int pSize) private
CrudeIncrementalIntIdentityHashBiMap
(K[] pKeys, int[] pValues, K[] pById, int pNextId, int pSize) -
Method Summary
Modifier and TypeMethodDescriptionint
Adds the given object while expanding this mapvoid
addMapping
(K pObject, int pIntKey) Puts the provided object value with the integer key.byId
(int pValue) void
clear()
boolean
contains
(int pValue) boolean
copy()
static <A> CrudeIncrementalIntIdentityHashBiMap
<A> create
(int pSize) private int
findEmpty
(int pStartIndex) int
Gets the integer ID we use to identify the given object.private int
getValue
(int pKey) private void
grow
(int pCapacity) Rehashes the map to the new capacityprivate int
private int
iterator()
private int
nextId()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.core.IdMap
byIdOrThrow, getIdOrThrow
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NOT_FOUND
private static final int NOT_FOUND- See Also:
-
EMPTY_SLOT
-
LOADFACTOR
private static final float LOADFACTOR- See Also:
-
keys
-
values
private int[] values -
byId
-
nextId
private int nextId -
size
private int size
-
-
Constructor Details
-
CrudeIncrementalIntIdentityHashBiMap
private CrudeIncrementalIntIdentityHashBiMap(int pSize) -
CrudeIncrementalIntIdentityHashBiMap
-
-
Method Details
-
create
-
getId
Gets the integer ID we use to identify the given object. -
byId
-
getValue
private int getValue(int pKey) -
contains
-
contains
public boolean contains(int pValue) -
add
Adds the given object while expanding this map -
nextId
private int nextId() -
grow
private void grow(int pCapacity) Rehashes the map to the new capacity -
addMapping
Puts the provided object value with the integer key. -
hash
-
indexOf
-
findEmpty
private int findEmpty(int pStartIndex) -
iterator
-
clear
public void clear() -
size
public int size() -
copy
-