Package net.minecraft.util.collection
Class Int2ObjectBiMap<K>
java.lang.Object
net.minecraft.util.collection.Int2ObjectBiMap<K>
- All Implemented Interfaces:
Iterable<K>,IndexedIterable<K>
public class Int2ObjectBiMap<K> extends Object implements IndexedIterable<K>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Int2ObjectBiMap(int size) -
Method Summary
Modifier and Type Method Description intadd(K value)voidclear()booleancontainsId(int id)private intfindFree(int size)private intfindIndex(K value, int id)Kget(int index)intgetId(K value)private intgetIdealIndex(K value)private intgetIdFromIndex(int index)Iterator<K>iterator()private intnextId()voidput(K value, int id)private voidresize(int newSize)intsize()
-
Field Details
-
Constructor Details
-
Int2ObjectBiMap
public Int2ObjectBiMap(int size)
-
-
Method Details
-
getId
-
get
- Specified by:
getin interfaceIndexedIterable<K>
-
getIdFromIndex
private int getIdFromIndex(int index) -
containsId
public boolean containsId(int id) -
add
-
nextId
private int nextId() -
resize
private void resize(int newSize) -
put
-
getIdealIndex
-
findIndex
-
findFree
private int findFree(int size) -
iterator
-
clear
public void clear() -
size
public int size()
-