LongPredicate represents a predicate (boolean-valued function) of one long-valued argument. This is the long-consuming primitive type specialization of Predicate.
The following example shows how to use LongPredicate
.
import java.util.function.LongPredicate; /* w ww . j a v a 2s. co m*/ public class Main { public static void main(String[] args) { LongPredicate i = (l) -> l>0; System.out.println(i.test(Long.MAX_VALUE)); } }
The code above generates the following result.