Package eu.bandm.tools.util.java
Class Arrays
java.lang.Object
eu.bandm.tools.util.java.Arrays
Library of constants and combinators for java language level arrays.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A> A[]
append
(A[] part1, A[]... parts) static <A> A[]
static <A> int
countNonNull
(A... parts) static <A> A[]
static <A> A[]
static <A> A[]
static <A> A[]
Makes a one-level array of non-array objects.static <A,
B> B[] static <A,
B> B[] map
(Function<? super A, ? extends B> fun, Class<B> range, Collection<A> things)
-
Method Details
-
flatten
Makes a one-level array of non-array objects. The input array may contain objects of class A and A[] and A[][], etc. so the procedure can only be typed dynamically. -
flatten
-
countNonNull
-
map
@Undocumented @SafeVarargs public static <A,B> B[] map(Function<? super A, ? extends B> fun, Class<B> range, A... things) -
map
@Undocumented public static <A,B> B[] map(Function<? super A, ? extends B> fun, Class<B> range, Collection<A> things) -
append
-
append
-
filter
-
filter
@Undocumented @SafeVarargs public static <A> A[] filter(Predicate<? super A> pred, Class<A> range, A... things)
-