In the last article, We've seen an in-depth article on Predicate Function Interface in Java 8. This works exactly similar to the Predicate. Predicate works for all data types but IntPredicate works only for int values.
Short Introduction:
IntPredicate represents a predicate (boolean-valued function) of one int-valued argument. This is the int-consuming primitive type specialization of Predicate. IntPredicate interface has a functional method test() which takes int as an argument and returns a boolean value. This interface has only one abstract method hence it is called FI.
We will be seeing the syntax and its example programs on test(int value), and(IntPredicate other), negate() and or(IntPredicate other) methods.
test() is an abstract method and the remaining 3 are default methods.