Class PZArrayUtil
java.lang.Object
zombie.util.list.PZArrayUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float[]
static final int[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[]
add
(float[] float1, float float2) static <E> E[]
add
(E[] object1, E object2) static <E> void
static <E> void
addAll
(PZArrayList<E> pZArrayList, List<E> list) static int[]
arrayAdd
(int[] int1, int[] int2) static <L extends List<E>,
E, S>
LarrayConvert
(L list0, List<S> list1, Function<S, E> function) static float[]
arrayCopy
(float[] float1, float[] float0, int int1, int int2) static int[]
arrayCopy
(int[] int4, int[] int3, int int1, int int2) static <E> E[]
static <E,
S extends E>
E[]arrayCopy
(E[] object1, S[] object0) static <E,
S extends E>
E[]arrayCopy
(E[] object0, S[] object1, int int0, int int1) static <E,
S extends E>
E[]arrayCopy
(E[] object0, S[] object1, int int1, int int2, Supplier<E> supplier, Invokers.Params2.ICallback<E, S> iCallback) static <L extends List<E>,
E>
Lstatic <E> E[]
arrayPopulate
(E[] object, Supplier<E> supplier) static <E> E[]
arrayPopulate
(E[] object, Supplier<E> supplier, int int1, int int2) static float[]
arraySet
(float[] float0, float float1) static int[]
arraySet
(int[] int0, int int3) static <E> E[]
arraySet
(E[] object0, E object1) static String
arrayToString
(float[] float0) static String
arrayToString
(float[] float0, String string0, String string1, String string2) static <E> String
arrayToString
(E[] object) static <E> String
arrayToString
(E[] object, String string0, String string1, String string2) static <E> String
arrayToString
(E[] object, Function<E, String> function, String string0, String string1, String string2) static <E> String
arrayToString
(Iterable<E> list) static <E> String
arrayToString
(Iterable<E> list, String prefix, String suffix, String delimiter) static <E> String
arrayToString
(Iterable<E> list, Function<E, String> toString) static <E> String
arrayToString
(Iterable<E> list, Function<E, String> toString, String prefix, String suffix, String delimiter) static float[]
clone
(float[] float0) static <E> E[]
clone
(E[] object0, Supplier<E> supplier, Invokers.Params2.ICallback<E, E> iCallback) static <E> E[]
concat
(E[] object0, E[] object1) static boolean
contains
(float[] float0, int int0, float float1) static boolean
contains
(int[] int0, int int1, int int2) static <E> boolean
static <E> boolean
static <E> boolean
contains
(Collection<E> it, Predicate<E> comparer) static <E> boolean
static <E> void
Perform a shallow copy of the source array into the target array.static <E> void
Perform a copy of the source array into the target array, using the supplied ICloner.static <E> E
static <E> E
static <E> E
static <E> void
static <E> void
Iterate over specified Iterable, invoke supplied consumer on each element.static <E> void
Iterate over specified list, invoke supplied consumer on each element.static <E> void
forEachReplace
(List<E> list, Function<? super E, ? super E> function) static <E> E
getElementAt
(Iterable<E> iterable, int int1) static <K,
V> V getOrCreate
(HashMap<K, V> hashMap, K object1, Supplier<V> supplier) static float
getOrDefault
(float[] float1, int int0, float float0) static <E> E
getOrDefault
(E[] object1, int int0, E object0) static <E> E
getOrDefault
(List<E> list, int int0) static <E> E
getOrDefault
(List<E> list, int int0, E object) static <E> int
Count the number of elements in the supplied Iterable.static int
indexOf
(float[] float1, int int1, float float0) static int
indexOf
(int[] int3, int int1, int int2) static <E> int
indexOf
(E[] object1, int int1, E object0) static <E> int
static <E> int
static void
insertAt
(float[] float0, int int1, float float1) static void
insertAt
(int[] int1, int int2, int int3) static boolean
isNullOrEmpty
(float[] float0) static boolean
isNullOrEmpty
(int[] int0) static <E> boolean
isNullOrEmpty
(E[] object) static <E> boolean
isNullOrEmpty
(Iterable<E> it) static <E> boolean
isNullOrEmpty
(List<E> list) static <E,
S> Iterable <E> static <E> int
lengthOf
(E[] object) 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> list1, List<E> list0, T1 object, PZArrayUtil.IListConverter1Param<S, E, T1> iListConverter1Param) static <E> E[]
newInstance
(Class<?> _class, int int0) static <E> E[]
newInstance
(Class<?> _class, int int0, Supplier<E> supplier) static <E> E[]
newInstance
(Class<?> _class, E[] object, int int0) static <E> E[]
newInstance
(Class<?> _class, E[] object, int int0, boolean boolean0) static <E> E[]
newInstance
(Class<?> _class, E[] object0, int int0, boolean boolean0, Supplier<E> supplier) static <E> E[]
newInstance
(Class<?> _class, E[] object, int int0, Supplier<E> supplier) static <E> E
pickRandom
(E[] object) static <E> E
pickRandom
(E[] object, RandInterface randInterface) static <E> E
pickRandom
(Iterable<E> iterable) static <E> E
pickRandom
(Iterable<E> iterable, RandInterface randInterface) static <E> E
pickRandom
(Collection<E> collection) static <E> E
pickRandom
(Collection<E> collection, RandInterface randInterface) static <E> E
pickRandom
(List<E> list) static <E> E
pickRandom
(List<E> list, RandInterface randInterface) static <E> boolean
sequenceEqual
(E[] object, List<? extends E> list) static <E> boolean
sequenceEqual
(E[] object, List<? extends E> list, Comparator<E> comparator) static <E> boolean
sequenceEqual
(List<? extends E> a, List<? extends E> b) static <E> boolean
sequenceEqual
(List<? extends E> a, List<? extends E> b, Comparator<E> comparator) static <E> E[]
shallowClone
(E[] object) static <E> void
sort
(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[] object) -
pickRandom
-
pickRandom
-
pickRandom
-
getSize
Count the number of elements in the supplied Iterable. -
getElementAt
public static <E> E getElementAt(Iterable<E> iterable, int int1) throws ArrayIndexOutOfBoundsException - Throws:
ArrayIndexOutOfBoundsException
-
copy
-
copy
Perform a copy of the source array into the target array, using the supplied ICloner. The target array's contents first cleared, and then populated with elements generated using the ICloner.clone() function. -
indexOf
-
indexOf
-
contains
-
contains
-
contains
-
contains
-
find
-
find
-
find
-
listConvert
-
itConvert
-
listConvert
-
lengthOf
public static <E> int lengthOf(E[] object) -
listConvert
public static <E,S, List<E> listConvertT1> (List<S> list1, List<E> list0, T1 object, PZArrayUtil.IListConverter1Param<S, E, T1> iListConverter1Param) -
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
arrayToString
-
newInstance
-
newInstance
-
newInstance
-
newInstance
-
newInstance
-
newInstance
-
add
public static float[] add(float[] float1, float float2) -
add
public static <E> E[] add(E[] object1, E object2) -
concat
public static <E> E[] concat(E[] object0, E[] object1) -
arrayCopy
public static <E,S extends E> E[] arrayCopy(E[] object0, S[] object1, int int0, int int1) -
arrayCopy
public static <E,S extends E> E[] arrayCopy(E[] object0, S[] object1, int int1, int int2, Supplier<E> supplier, Invokers.Params2.ICallback<E, S> iCallback) -
arrayCopy
public static float[] arrayCopy(float[] float1, float[] float0, int int1, int int2) -
arrayCopy
public static int[] arrayCopy(int[] int4, int[] int3, int int1, int int2) -
arrayCopy
-
arrayCopy
-
arrayCopy
public static <E,S extends E> E[] arrayCopy(E[] object1, S[] object0) -
arrayConvert
-
clone
public static float[] clone(float[] float0) -
clone
public static <E> E[] clone(E[] object0, Supplier<E> supplier, Invokers.Params2.ICallback<E, E> iCallback) -
shallowClone
public static <E> E[] shallowClone(E[] object) -
isNullOrEmpty
public static <E> boolean isNullOrEmpty(E[] object) -
isNullOrEmpty
public static boolean isNullOrEmpty(int[] int0) -
isNullOrEmpty
public static boolean isNullOrEmpty(float[] float0) -
isNullOrEmpty
-
isNullOrEmpty
-
getOrDefault
-
getOrDefault
-
getOrDefault
public static <E> E getOrDefault(E[] object1, int int0, E object0) -
getOrDefault
public static float getOrDefault(float[] float1, int int0, float float0) -
arraySet
public static int[] arraySet(int[] int0, int int3) -
arraySet
public static float[] arraySet(float[] float0, float float1) -
arraySet
public static <E> E[] arraySet(E[] object0, E object1) -
arrayPopulate
-
arrayPopulate
-
insertAt
public static void insertAt(int[] int1, int int2, int int3) -
insertAt
public static void insertAt(float[] float0, int int1, float float1) -
toArray
-
indexOf
public static <E> int indexOf(E[] object1, int int1, E object0) -
indexOf
public static int indexOf(float[] float1, int int1, float float0) -
contains
public static boolean contains(float[] float0, int int0, float float1) -
indexOf
public static int indexOf(int[] int3, int int1, int int2) -
contains
public static boolean contains(int[] int0, int int1, int int2) -
forEach
-
forEach
-
forEach
-
forEachReplace
-
getOrCreate
-
sort
-
sequenceEqual
-
sequenceEqual
public static <E> boolean sequenceEqual(E[] object, List<? extends E> list, Comparator<E> comparator) -
sequenceEqual
-
sequenceEqual
public static <E> boolean sequenceEqual(List<? extends E> a, List<? extends E> b, Comparator<E> comparator) -
arrayAdd
public static int[] arrayAdd(int[] int1, int[] int2) -
addAll
-
addAll
-