Package net.minecraft.util
Class SortedArraySet<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractSet<T>
net.minecraft.util.SortedArraySet<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,Set<T>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Comparator
<T> (package private) T[]
private static final int
(package private) int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
addInternal
(T p_14256_, int p_14257_) private static <T> T[]
castRawArray
(Object[] p_14259_) void
clear()
boolean
static <T extends Comparable<T>>
SortedArraySet<T> create()
static <T extends Comparable<T>>
SortedArraySet<T> create
(int p_14247_) static <T> SortedArraySet
<T> create
(Comparator<T> p_144977_) static <T> SortedArraySet
<T> create
(Comparator<T> p_144979_, int p_144980_) boolean
private int
first()
private static int
getInsertionPosition
(int p_14264_) private T
getInternal
(int p_14277_) private void
grow
(int p_14268_) iterator()
last()
boolean
(package private) void
removeInternal
(int p_14275_) int
size()
Object[]
toArray()
<U> U[]
toArray
(U[] p_14286_) 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
-
DEFAULT_INITIAL_CAPACITY
private static final int DEFAULT_INITIAL_CAPACITY- See Also:
-
comparator
-
contents
T[] contents -
size
int size
-
-
Constructor Details
-
SortedArraySet
-
-
Method Details
-
create
-
create
-
create
-
create
-
castRawArray
-
findIndex
-
getInsertionPosition
private static int getInsertionPosition(int p_14264_) -
add
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classAbstractCollection<T>
-
grow
private void grow(int p_14268_) -
addInternal
-
removeInternal
void removeInternal(int p_14275_) -
getInternal
-
addOrGet
-
remove
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceSet<T>
- Overrides:
remove
in classAbstractCollection<T>
-
get
-
first
-
last
-
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_14286_) - 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>
-