Class PZArrayUtil
java.lang.Object
zombie.util.list.PZArrayUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float[]static final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[]add(float[] array, float val) static int[]add(int[] array, int val) static <E> E[]add(E[] array, E val) static <E> voidstatic <E> voidaddAll(PZArrayList<E> dest, List<E> src) static int[]arrayAdd(int[] in_out_a, int[] b) static <L extends List<E>, E, S>
LarrayConvert(L to, List<S> from, Function<S, E> converter) static float[]arrayCopy(float[] to, float[] from, int startIdx, int endIdx) static int[]arrayCopy(int[] to, int[] from, int startIdx, int endIdx) static <E> E[]static <E, S extends E>
E[]arrayCopy(E[] to, S[] from) static <E, S extends E>
E[]arrayCopy(E[] to, S[] from, int startIdx, int endIdx) static <E, S extends E>
E[]arrayCopy(E[] to, S[] from, int startIdx, int endIdx, Supplier<E> in_allocator, Invokers.Params2.ICallback<E, S> in_copier) static <L extends List<E>, E>
Lstatic <E> E[]arrayPopulate(E[] arr, Supplier<E> supplier) static <E> E[]arrayPopulate(E[] arr, Supplier<E> supplier, int in_startIdx, int in_endIdx) static float[]arraySet(float[] arr, float val) static int[]arraySet(int[] arr, int val) static <E> E[]arraySet(E[] arr, E val) static StringarrayToString(float[] list) static StringarrayToString(float[] list, String prefix, String suffix, String delimiter) static <E> StringarrayToString(E[] list) static <E> StringarrayToString(E[] list, String prefix, String suffix, String delimiter) static <E> StringarrayToString(E[] list, Function<E, String> toString, String prefix, String suffix, String delimiter) static <E> StringarrayToString(Iterable<E> list) static <E> StringarrayToString(Iterable<E> list, String prefix, String suffix, String delimiter) static <E> StringarrayToString(Iterable<E> list, Function<E, String> toString) static <E> StringarrayToString(Iterable<E> list, Function<E, String> toString, String prefix, String suffix, String delimiter) static float[]clone(float[] src) static <E> E[]clone(E[] src, Supplier<E> in_allocator, Invokers.Params2.ICallback<E, E> in_copier) static <E> E[]concat(E[] arrayA, E[] arrayB) static booleancontains(float[] arr, int count, float val) static booleancontains(int[] arr, int count, int val) static <E> booleancontains(E[] collection, int count, E e) static <E,E1> boolean contains(E[] collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> booleanstatic <E,E1> boolean contains(Iterable<E> it, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> booleanstatic <E,E1> boolean contains(Collection<E> it, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> booleancontains(Collection<E> it, Predicate<E> predicate) static <E,E1> boolean contains(List<E> collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> booleanstatic <E> voidstatic <E> voidstatic <E> Estatic <E> Estatic <E> Estatic <E> voidstatic <E> voidstatic <E> voidstatic <E> voidforEachReplace(List<E> list, Function<? super E, ? super E> replacer) static <E> EgetElementAt(Iterable<E> collection, int index) static <K,V> V getOrCreate(HashMap<K, V> map, K key, Supplier<V> allocator) static floatgetOrDefault(float[] list, int i, float defaultVal) static <E> EgetOrDefault(E[] list, int i, E defaultVal) static <E> EgetOrDefault(List<E> list, int i) static <E> EgetOrDefault(List<E> list, int i, E defaultVal) static <E> intstatic intindexOf(float[] arr, int count, float val) static intindexOf(int[] arr, int count, int val) static <E> intindexOf(E[] arr, int count, E val) static <E,E1> int indexOf(E[] collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> intstatic <E,E1> int indexOf(List<E> collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) static <E> intstatic voidinsertAt(float[] arr, int insertAt, float val) static voidinsertAt(int[] arr, int insertAt, int val) static booleanisNullOrEmpty(float[] array) static booleanisNullOrEmpty(int[] array) static <E> booleanisNullOrEmpty(E[] array) static <E> booleanisNullOrEmpty(Iterable<E> it) static <E> booleanisNullOrEmpty(List<E> list) static <E,S> Iterable <E> static intlengthOf(float[] in_array) static intlengthOf(int[] in_array) static <E> intlengthOf(E[] in_array) static <E,S> List <E> listConvert(List<S> source, Function<S, E> converter) static <E,S> List <E> listConvert(List<S> source, List<E> dest, Function<S, E> converter) static <E,S, T1> List <E> listConvert(List<S> source, List<E> dest, T1 v1, PZArrayUtil.IListConverter1Param<S, E, T1> converter) static <E> E[]newInstance(Class<?> componentType, int length) static <E> E[]newInstance(Class<?> componentType, int length, Supplier<E> allocator) static <E> E[]newInstance(Class<?> componentType, E[] reusableArray, int newLength) static <E> E[]newInstance(Class<?> componentType, E[] reusableArray, int newLength, boolean growOnly) static <E> E[]newInstance(Class<?> componentType, E[] reusableArray, int newLength, boolean growOnly, Supplier<E> newAllocator) static <E> E[]newInstance(Class<?> componentType, E[] reusableArray, int newLength, Supplier<E> newAllocator) static <E> EpickRandom(E[] collection) static <E> EpickRandom(E[] collection, RandInterface rnd) static <E> EpickRandom(Iterable<E> collection) static <E> EpickRandom(Iterable<E> collection, RandInterface rnd) static <E> EpickRandom(Collection<E> collection) static <E> EpickRandom(Collection<E> collection, RandInterface rnd) static <E> EpickRandom(List<E> collection) static <E> EpickRandom(List<E> collection, RandInterface rnd) static <E> booleansequenceEqual(E[] a, List<? extends E> b) static <E> booleansequenceEqual(E[] a, List<? extends E> b, Comparator<E> comparator) static <E> booleansequenceEqual(List<? extends E> a, List<? extends E> b) static <E> booleansequenceEqual(List<? extends E> a, List<? extends E> b, Comparator<E> comparator) static <E> E[]shallowClone(E[] src) static <E> voidsort(Stack<E> stack, Comparator<E> comparator) static <E> E[]
-
Field Details
-
emptyIntArray
public static final int[] emptyIntArray -
emptyFloatArray
public static final float[] emptyFloatArray
-
-
Constructor Details
-
PZArrayUtil
public PZArrayUtil()
-
-
Method Details
-
pickRandom
-
pickRandom
-
pickRandom
-
pickRandom
-
pickRandom
public static <E> E pickRandom(E[] collection) -
pickRandom
-
pickRandom
-
pickRandom
-
getSize
-
getElementAt
public static <E> E getElementAt(Iterable<E> collection, int index) throws ArrayIndexOutOfBoundsException - Throws:
ArrayIndexOutOfBoundsException
-
copy
-
copy
-
indexOf
public static <E,E1> int indexOf(E[] collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
indexOf
public static <E,E1> int indexOf(List<E> collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
indexOf
-
indexOf
-
contains
public static <E> boolean contains(E[] collection, int count, E e) -
contains
public static <E,E1> boolean contains(E[] collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
contains
public static <E,E1> boolean contains(List<E> collection, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
contains
public static <E,E1> boolean contains(Collection<E> it, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
contains
public static <E,E1> boolean contains(Iterable<E> it, E1 containsItem, Predicates.Params1.ICallback<E1, E> predicate) -
contains
-
contains
-
contains
-
contains
-
find
-
find
-
find
-
listConvert
-
itConvert
-
listConvert
-
lengthOf
public static <E> int lengthOf(E[] in_array) -
lengthOf
public static int lengthOf(int[] in_array) -
lengthOf
public static int lengthOf(float[] in_array) -
listConvert
public static <E,S, List<E> listConvertT1> (List<S> source, List<E> dest, T1 v1, PZArrayUtil.IListConverter1Param<S, E, T1> converter) -
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
newInstance
-
newInstance
-
newInstance
-
newInstance
public static <E> E[] newInstance(Class<?> componentType, E[] reusableArray, int newLength, boolean growOnly) -
newInstance
-
newInstance
-
add
public static float[] add(float[] array, float val) -
add
public static int[] add(int[] array, int val) -
add
public static <E> E[] add(E[] array, E val) -
concat
public static <E> E[] concat(E[] arrayA, E[] arrayB) -
arrayCopy
public static <E, S extends E> E[] arrayCopy(E[] to, S[] from, int startIdx, int endIdx) -
arrayCopy
public static <E, S extends E> E[] arrayCopy(E[] to, S[] from, int startIdx, int endIdx, Supplier<E> in_allocator, Invokers.Params2.ICallback<E, S> in_copier) -
arrayCopy
public static float[] arrayCopy(float[] to, float[] from, int startIdx, int endIdx) -
arrayCopy
public static int[] arrayCopy(int[] to, int[] from, int startIdx, int endIdx) -
arrayCopy
-
arrayCopy
-
arrayCopy
public static <E, S extends E> E[] arrayCopy(E[] to, S[] from) -
arrayConvert
-
clone
public static float[] clone(float[] src) -
clone
public static <E> E[] clone(E[] src, Supplier<E> in_allocator, Invokers.Params2.ICallback<E, E> in_copier) -
shallowClone
public static <E> E[] shallowClone(E[] src) -
isNullOrEmpty
public static <E> boolean isNullOrEmpty(E[] array) -
isNullOrEmpty
public static boolean isNullOrEmpty(int[] array) -
isNullOrEmpty
public static boolean isNullOrEmpty(float[] array) -
isNullOrEmpty
-
isNullOrEmpty
-
getOrDefault
-
getOrDefault
-
getOrDefault
public static <E> E getOrDefault(E[] list, int i, E defaultVal) -
getOrDefault
public static float getOrDefault(float[] list, int i, float defaultVal) -
arraySet
public static int[] arraySet(int[] arr, int val) -
arraySet
public static float[] arraySet(float[] arr, float val) -
arraySet
public static <E> E[] arraySet(E[] arr, E val) -
arrayPopulate
-
arrayPopulate
-
insertAt
public static void insertAt(int[] arr, int insertAt, int val) -
insertAt
public static void insertAt(float[] arr, int insertAt, float val) -
toArray
-
indexOf
public static <E> int indexOf(E[] arr, int count, E val) -
indexOf
public static int indexOf(float[] arr, int count, float val) -
contains
public static boolean contains(float[] arr, int count, float val) -
indexOf
public static int indexOf(int[] arr, int count, int val) -
contains
public static boolean contains(int[] arr, int count, int val) -
forEach
-
forEach
-
forEach
-
forEachReplace
-
getOrCreate
-
sort
-
sequenceEqual
-
sequenceEqual
-
sequenceEqual
-
sequenceEqual
public static <E> boolean sequenceEqual(List<? extends E> a, List<? extends E> b, Comparator<E> comparator) -
arrayAdd
public static int[] arrayAdd(int[] in_out_a, int[] b) -
addAll
-
addAll
-