public class ListUtil extends Object
Constructor | Description |
---|---|
ListUtil() |
Modifier and Type | Method | Description |
---|---|---|
static <T> T |
findAny(List<T> candidates,
Predicate<T> predicate) |
tries to select the first element where the predicate matches from front (index 0) to the end of the list
|
public static <T> T findAny(List<T> candidates, Predicate<T> predicate)
T
- generic typecandidates
- the candidates from which the method may select the first onepredicate
- the checked predicate for each elementCopyright © 2020 OpenNARS. All rights reserved.