com.scichart.core.utility Package > ListUtil Class > first Method : first<T>(List<T>,Predicate<T>) Method
The type of elements in the list.
The list to process.
The predicate to check.
first<T>(List<T>,Predicate<T>) Method
Selects the first item from the list which satisfies specified predicate, if list is empty or match not found throws exception.
Syntax
public static <T> T first( 
   java.util.List<T> collection,
   com.scichart.core.common.Predicate<T> predicate
)

Parameters

collection
The list to process.
predicate
The predicate to check.

Type Parameters

T
The type of elements in the list.

Return Value

The first item from the list which satisfies specified predicate.
See Also