public Interface Predicate public boolean isTruthy Object public abstr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
public Interface Predicate {
public boolean isTruthy(Object o);
}
public abstract class Filter {
public abstract makePredicate(int k);
}
public class TimeFilter extends Filter {
public Predicate makePredicate(int k) {
return new Predicate() {
public boolean isTruthy(Object o) {
return o.someBoolean;
}
}
}
}