public class ArrayHelper
extends java.lang.Object
Arrays.| Constructor and Description |
|---|
ArrayHelper() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
findFirstMatch(T[][] input,
Predicate<T> predicate)
Find the first element in the array that matches the predicate.
|
static <T> T |
findFirstMatch(T[] input,
Predicate<T> predicate)
Find the first element in the array that matches the predicate.
|
public static <T> T findFirstMatch(T[] input,
Predicate<T> predicate)
T - The type of element to use.input - The array of candidates to match. Not null.predicate - The match condition. Not null.public static <T> T findFirstMatch(T[][] input,
Predicate<T> predicate)
#findFirstMatch(T[], Predicate),
iteration is right-to-left as usual in Java.T - The type of element to use.input - The array of candidates to match. Not null.predicate - The match condition. Not null.