예제 #1
0
 @Override
 public boolean evaluate(PredicateParser parser, Object object, Predicate predicate) {
   for (Predicate child : ((CompoundPredicate) predicate).getChildren()) {
     if (parser.evaluate(object, child)) {
       return true;
     }
   }
   return false;
 }
예제 #2
0
 /** Returns {@code true} if the given {@code predicate} matches the given {@code object}. */
 public static boolean evaluate(Object object, Predicate predicate) {
   return DEFAULT_PARSER.evaluate(object, predicate);
 }
예제 #3
0
 /**
  * Parses the given {@code predicateString} along with the given {@code parameters} into a
  * predicate object.
  */
 public static Predicate parse(String predicateString, Object... parameters) {
   return DEFAULT_PARSER.parse(predicateString, parameters);
 }