This post explains how we can combine two or more predicates using logical operations as mentioned below 1) and 2) or 3) negate Below is an example Person package Function; public class Person { private String ssn; private String fname; private String lname; private String description; private int age; public String getSsn() { return ssn;…… Continue reading Combining Predicates
Tag: predicate
Java Predicate
Java provides a new interface named Predicate which is a functional interface. A functional interface is an interface which will have exactly one abstract method in addition to one or more default methods. In the case of Predicate interface, the abstract method is test method whose signature is as shown below boolean test(T t) In…… Continue reading Java Predicate