Class Array<T>
java.lang.Object
zombie.entity.util.Array<T>
- All Implemented Interfaces:
Iterable<T>
- Direct Known Subclasses:
SnapshotArray
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoidclear()booleanbooleancontainsAll(Array<? extends T> values, boolean identity) booleancontainsAny(Array<? extends T> values, boolean identity) T[]ensureCapacity(int additionalCapacity) booleanbooleanequalsIdentity(Object object) first()get(int index) inthashCode()intvoidvoidinsertRange(int index, int count) booleanisEmpty()iterator()intlastIndexOf(@Nullable T value, boolean identity) booleannotEmpty()static <T> Array<T> static <T> Array<T> peek()pop()@Nullable Trandom()booleanremoveIndex(int index) voidremoveRange(int start, int end) booleanremoveValue(@Nullable T value, boolean identity) voidreverse()selectRanked(Comparator<T> comparator, int kthLowest) intselectRankedIndex(Comparator<T> comparator, int kthLowest) voidT[]setSize(int newSize) T[]shrink()voidshuffle()voidsort()voidsort(Comparator<? super T> comparator) voidswap(int first, int second) T[]toArray()<V> V[]toString()voidtruncate(int newSize) static <T> Array<T> with(T... array) Methods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
items
-
size
public int size -
ordered
public boolean ordered
-
-
Constructor Details
-
Array
public Array() -
Array
public Array(int capacity) -
Array
public Array(boolean ordered, int capacity) -
Array
-
Array
-
Array
-
Array
-
Array
-
-
Method Details
-
add
-
add
-
add
-
add
-
addAll
-
addAll
-
addAll
-
addAll
-
get
-
set
-
insert
-
insertRange
public void insertRange(int index, int count) -
swap
public void swap(int first, int second) -
contains
-
containsAll
-
containsAny
-
indexOf
-
lastIndexOf
-
removeValue
-
removeIndex
-
removeRange
public void removeRange(int start, int end) -
removeAll
-
pop
-
peek
-
first
-
notEmpty
public boolean notEmpty() -
isEmpty
public boolean isEmpty() -
clear
public void clear() -
shrink
-
ensureCapacity
-
setSize
-
sort
public void sort() -
sort
-
selectRanked
-
selectRankedIndex
-
reverse
public void reverse() -
shuffle
public void shuffle() -
iterator
-
select
-
truncate
public void truncate(int newSize) -
random
-
toArray
-
toArray
-
hashCode
-
equals
-
equalsIdentity
-
toString
-
toString
-
of
-
of
-
with
-