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:
Iterable<T>
,Collection<T>
,Set<T>
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
SortedArraySet
(int p_i225697_1_, Comparator<T> p_i225697_2_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
addInternal
(T p_226176_1_, int p_226176_2_) private static <T> T[]
castRawArray
(Object[] p_226177_0_) void
clear()
boolean
static <T extends Comparable<T>>
SortedArraySet<T>create
(int p_226172_0_) boolean
private int
first()
private static int
getInsertionPosition
(int p_226179_0_) private T
getInternal
(int p_226184_1_) private void
grow
(int p_226181_1_) iterator()
boolean
private void
removeInternal
(int p_226183_1_) int
size()
Object[]
toArray()
<U> U[]
toArray
(U[] p_toArray_1_) Methods inherited from class java.util.AbstractSet
hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, retainAll, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, retainAll, spliterator
-
Field Details
-
comparator
-
contents
-
size
private int size
-
-
Constructor Details
-
SortedArraySet
-
-
Method Details
-
create
-
castRawArray
-
findIndex
-
getInsertionPosition
private static int getInsertionPosition(int p_226179_0_) -
add
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classAbstractCollection<T>
-
grow
private void grow(int p_226181_1_) -
addInternal
-
removeInternal
private void removeInternal(int p_226183_1_) -
getInternal
-
addOrGet
-
remove
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceSet<T>
- Overrides:
remove
in classAbstractCollection<T>
-
first
-
contains
- Specified by:
contains
in interfaceCollection<T>
- Specified by:
contains
in interfaceSet<T>
- Overrides:
contains
in classAbstractCollection<T>
-
iterator
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceSet<T>
- Specified by:
size
in classAbstractCollection<T>
-
toArray
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceSet<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
toArray
public <U> U[] toArray(U[] p_toArray_1_) - Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceSet<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceSet<T>
- Overrides:
clear
in classAbstractCollection<T>
-
equals
- Specified by:
equals
in interfaceCollection<T>
- Specified by:
equals
in interfaceSet<T>
- Overrides:
equals
in classAbstractSet<T>
-