I want to check if all objects of a stream meet a rule, and returns True only if all of them meets the rule,
but I have a compilation error: Role cannot be applied to lambda parameter
public static Predicate<Hostel> areAllTrue() {
return req -> req.getRole().stream(r -> isTrue(r));
}
private static boolean isTrue(HostelRole hostelRole) {
}