Class ArrayUtil
java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.ArrayUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]append(T[] a, T e) static <T,G> int binarySearch(List<T> sortedList, G gauge, BiFunction<G, T, Integer> comparator) static <T> T[]brokenCopyOf(T[] a) static <T> voidcopy(T[] source, T[] destination) static int[]getPartSizes(int total, int partCount) static <T,G> int sortedSearch(List<T> sortedList, G gauge, BiFunction<G, T, Integer> comparator)
-
Constructor Details
-
ArrayUtil
public ArrayUtil()
-
-
Method Details
-
brokenCopyOf
@Nonnull public static <T> T[] brokenCopyOf(@Nonnull T[] a) -
copy
public static <T> void copy(@Nonnull T[] source, @Nonnull T[] destination) -
append
@Nonnull public static <T> T[] append(@Nonnull T[] a, T e) -
split
-
getPartSizes
public static int[] getPartSizes(int total, int partCount) -
sortedSearch
public static <T,G> int sortedSearch(@Nonnull List<T> sortedList, @Nonnull G gauge, @Nonnull BiFunction<G, T, Integer> comparator) -
binarySearch
public static <T,G> int binarySearch(@Nonnull List<T> sortedList, @Nonnull G gauge, @Nonnull BiFunction<G, T, Integer> comparator)
-