Package net.minecraft.util
Class SortedArraySet<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<T>
-
- net.minecraft.util.SortedArraySet<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.Set<T>
public class SortedArraySet<T> extends java.util.AbstractSet<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
SortedArraySet.Itr
-
Field Summary
Fields Modifier and Type Field Description private java.util.Comparator<T>
comparator
private T[]
contents
private int
size
-
Constructor Summary
Constructors Modifier Constructor Description private
SortedArraySet(int p_i225697_1_, java.util.Comparator<T> p_i225697_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T p_add_1_)
private void
addInternal(T p_226176_1_, int p_226176_2_)
T
addOrGet(T p_226175_1_)
private static <T> T[]
castRawArray(java.lang.Object[] p_226177_0_)
void
clear()
boolean
contains(java.lang.Object p_contains_1_)
static <T extends java.lang.Comparable<T>>
SortedArraySet<T>create(int p_226172_0_)
boolean
equals(java.lang.Object p_equals_1_)
private int
findIndex(T p_226182_1_)
T
first()
private static int
getInsertionPosition(int p_226179_0_)
private T
getInternal(int p_226184_1_)
private void
grow(int p_226181_1_)
java.util.Iterator<T>
iterator()
boolean
remove(java.lang.Object p_remove_1_)
private void
removeInternal(int p_226183_1_)
int
size()
java.lang.Object[]
toArray()
<U> U[]
toArray(U[] p_toArray_1_)
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, retainAll, toString
-
-
-
-
Constructor Detail
-
SortedArraySet
private SortedArraySet(int p_i225697_1_, java.util.Comparator<T> p_i225697_2_)
-
-
Method Detail
-
create
public static <T extends java.lang.Comparable<T>> SortedArraySet<T> create(int p_226172_0_)
-
castRawArray
private static <T> T[] castRawArray(java.lang.Object[] p_226177_0_)
-
findIndex
private int findIndex(T p_226182_1_)
-
getInsertionPosition
private static int getInsertionPosition(int p_226179_0_)
-
add
public boolean add(T p_add_1_)
-
grow
private void grow(int p_226181_1_)
-
addInternal
private void addInternal(T p_226176_1_, int p_226176_2_)
-
removeInternal
private void removeInternal(int p_226183_1_)
-
getInternal
private T getInternal(int p_226184_1_)
-
remove
public boolean remove(java.lang.Object p_remove_1_)
-
first
public T first()
-
contains
public boolean contains(java.lang.Object p_contains_1_)
-
iterator
public java.util.Iterator<T> iterator()
-
size
public int size()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <U> U[] toArray(U[] p_toArray_1_)
-
clear
public void clear()
-
-