Package arc.util
Class Structs
java.lang.Object
arc.util.Structs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]add(T[] array, T item) static <T> T[]arr(T... array) static <T,U extends Comparable<? super U>>
Comparator<T>static <T,U> Comparator<T> comparing(Func<? super T, ? extends U> keyExtractor, Comparator<? super U> keyComparator) static <T> Comparator<T>comparingBool(Boolf<? super T> keyExtractor) static <T> Comparator<T>comparingFloat(Floatf<? super T> keyExtractor) static <T> Comparator<T>comparingInt(Intf<? super T> keyExtractor) static <T> Comparator<T>comparingLong(Longf<? super T> keyExtractor) static <T> Comparator<T>comps(Comparator<T> first, Comparator<T> second) Equivalent to Comparator#thenComparsing, but more compatible.static <T> booleanstatic <T> booleanstatic <T> booleancontains(T[] array, T value) Uses identity comparisons.static <T> intstatic <T> voidstatic <T> voidstatic booleanstatic <T> T[]Deprecated.This does the invert of others.static <T> voidRemove all values that match this predicate.static <T> voidRemove all values that match this predicate.static <T> T[]static <T> Tstatic <T> Tstatic <T> TfindMin(Iterable<T> arr, Boolf<T> allow, Comparator<T> comp) static <T> TfindMin(Iterable<T> arr, Comparator<T> comp) static <T> Tstatic <T> TfindMin(T[] arr, Comparator<T> comp) static <T> voidstatic booleaninBounds(int x, int y, boolean[][] array) static booleaninBounds(int x, int y, float[][] array) static booleaninBounds(int x, int y, int[][] array) static booleaninBounds(int x, int y, int width, int height) static booleaninBounds(int x, int y, int z, int[][][] array) static booleaninBounds(int x, int y, int z, int size, int padding) static <T> booleaninBounds(int x, int y, int z, T[][][] array) static <T> booleaninBounds(int x, int y, T[][] array) static <T> intstatic <T> intstatic <T> intindexOf(T[] array, T value) static <T> T[]insert(T[] array, int index, T item) static <T> intstatic <T> intstatic <T> intstatic <T> intstatic <T> Tstatic <T> Trandom(T... array) static <T> T[]remove(T[] array, int index) static <T> T[]remove(T[] array, T value) static <T> voidswap(T[] array, int a, int b)
-
Constructor Details
-
Structs
public Structs()
-
-
Method Details
-
eq
-
arr
-
filter
Remove all values that match this predicate. -
filter
Remove all values that match this predicate. -
filter
-
filter
Deprecated.This does the invert of others. -
random
-
random
-
count
-
max
-
max
-
min
-
min
-
contains
public static <T> boolean contains(T[] array, T value) Uses identity comparisons. -
contains
-
contains
-
find
-
find
-
indexOf
public static <T> int indexOf(T[] array, T value) -
indexOf
-
indexOf
-
remove
public static <T> T[] remove(T[] array, T value) -
remove
public static <T> T[] remove(T[] array, int index) -
add
public static <T> T[] add(T[] array, T item) -
insert
public static <T> T[] insert(T[] array, int index, T item) -
swap
public static <T> void swap(T[] array, int a, int b) -
comps
Equivalent to Comparator#thenComparsing, but more compatible. -
comparing
public static <T,U> Comparator<T> comparing(Func<? super T, ? extends U> keyExtractor, Comparator<? super U> keyComparator) -
comparing
public static <T,U extends Comparable<? super U>> Comparator<T> comparing(Func<? super T, ? extends U> keyExtractor) -
comparingFloat
-
comparingInt
-
comparingLong
-
comparingBool
-
each
-
each
-
forEach
-
findMin
-
findMin
-
findMin
-
findMin
-
inBounds
public static <T> boolean inBounds(int x, int y, T[][] array) -
inBounds
public static boolean inBounds(int x, int y, int[][] array) -
inBounds
public static boolean inBounds(int x, int y, float[][] array) -
inBounds
public static boolean inBounds(int x, int y, boolean[][] array) -
inBounds
public static <T> boolean inBounds(int x, int y, int z, T[][][] array) -
inBounds
public static boolean inBounds(int x, int y, int z, int[][][] array) -
inBounds
public static boolean inBounds(int x, int y, int z, int size, int padding) -
inBounds
public static boolean inBounds(int x, int y, int width, int height)
-