Class SnapshotArray<T>
java.lang.Object
zombie.entity.util.Array<T>
zombie.entity.util.SnapshotArray<T>
- All Implemented Interfaces:
Iterable<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class Array
Array.ArrayIterable<T>, Array.ArrayIterator<T> -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotArray(boolean ordered, int capacity) SnapshotArray(boolean ordered, int capacity, Class<?> arrayType) SnapshotArray(boolean ordered, T[] array, int startIndex, int count) SnapshotArray(int capacity) SnapshotArray(Class<?> arrayType) SnapshotArray(T[] array) SnapshotArray(Array<T> array) -
Method Summary
Modifier and TypeMethodDescriptionT[]begin()voidclear()voidend()voidvoidinsertRange(int index, int count) pop()booleanremoveIndex(int index) voidremoveRange(int start, int end) booleanremoveValue(T value, boolean identity) voidreverse()voidT[]setSize(int newSize) voidshuffle()voidsort()voidsort(Comparator<? super T> comparator) voidswap(int first, int second) voidtruncate(int newSize) static <T> SnapshotArray<T> with(T... array) Methods inherited from class Array
add, add, add, add, addAll, addAll, addAll, addAll, contains, containsAll, containsAny, ensureCapacity, equals, equalsIdentity, first, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, notEmpty, of, of, peek, random, select, selectRanked, selectRankedIndex, shrink, toArray, toArray, toString, toStringMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
SnapshotArray
public SnapshotArray() -
SnapshotArray
-
SnapshotArray
-
SnapshotArray
public SnapshotArray(boolean ordered, int capacity) -
SnapshotArray
-
SnapshotArray
-
SnapshotArray
public SnapshotArray(int capacity) -
SnapshotArray
-
-
Method Details
-
begin
-
end
public void end() -
set
-
insert
-
insertRange
public void insertRange(int index, int count) - Overrides:
insertRangein classArray<T>
-
swap
-
removeValue
- Overrides:
removeValuein classArray<T>
-
removeIndex
- Overrides:
removeIndexin classArray<T>
-
removeRange
public void removeRange(int start, int end) - Overrides:
removeRangein classArray<T>
-
removeAll
-
pop
-
clear
-
sort
-
sort
-
reverse
-
shuffle
-
truncate
-
setSize
-
with
-