Is it possible to pass an argument to a lambdaj Predicate?
public static Matcher<SomeObject> isSpecialObject = new Predicate<SomeObject>() {
public boolean apply(SomeObject specialObj) {
return LIST_OF_SPECIAL_IDS.contains(specialObj.getTypeId());
}
};
I would like to alter the above predicate so I can pass in a list, rather than use the static list LIST_OF_SPECIAL_IDS. Is that possible?
Thanks.