Class ArrayHelper
java.lang.Object
net.sf.colossus.util.ArrayHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TfindFirstMatch(T[][] input, Predicate<T> predicate) Find the first element in the array that matches the predicate.static <T> TfindFirstMatch(T[] input, Predicate<T> predicate) Find the first element in the array that matches the predicate.
-
Constructor Details
-
ArrayHelper
public ArrayHelper()
-
-
Method Details
-
findFirstMatch
Find the first element in the array that matches the predicate.- Type Parameters:
T- The type of element to use.- Parameters:
input- The array of candidates to match. Not null.predicate- The match condition. Not null.- Returns:
- The first match or null if there is none.
-
findFirstMatch
Find the first element in the array that matches the predicate. This is a two-dimensional version of, iteration is right-to-left as usual in Java.invalid reference
#findFirstMatch(T[], Predicate)- Type Parameters:
T- The type of element to use.- Parameters:
input- The array of candidates to match. Not null.predicate- The match condition. Not null.- Returns:
- The first match or null if there is none.
-