/** * Creates a predicate that returns true if the given path matches exactly. */ public static Predicate path(final String path) { return new PathMatchPredicate(path); }
@Override public Predicate build(final Map<String, Object> config) { String[] path = (String[]) config.get("path"); return new PathMatchPredicate(path); } }
/** * Creates a predicate that returns true if any of the given paths match exactly. */ public static Predicate paths(final String... paths) { final PathMatchPredicate[] predicates = new PathMatchPredicate[paths.length]; for (int i = 0; i < paths.length; ++i) { predicates[i] = new PathMatchPredicate(paths[i]); } return or(predicates); }
/** * Creates a predicate that returns true if the given path matches exactly. */ public static Predicate path(final String path) { return new PathMatchPredicate(path); }
/** * Creates a predicate that returns true if the given path matches exactly. */ public static Predicate path(final String path) { return new PathMatchPredicate(path); }
@Override public Predicate build(final Map<String, Object> config) { String[] path = (String[]) config.get("path"); return new PathMatchPredicate(path); } }
@Override public Predicate build(final Map<String, Object> config) { String[] path = (String[]) config.get("path"); return new PathMatchPredicate(path); } }
/** * Creates a predicate that returns true if any of the given paths match exactly. */ public static Predicate paths(final String... paths) { final PathMatchPredicate[] predicates = new PathMatchPredicate[paths.length]; for (int i = 0; i < paths.length; ++i) { predicates[i] = new PathMatchPredicate(paths[i]); } return or(predicates); }
/** * Creates a predicate that returns true if any of the given paths match exactly. */ public static Predicate paths(final String... paths) { final PathMatchPredicate[] predicates = new PathMatchPredicate[paths.length]; for (int i = 0; i < paths.length; ++i) { predicates[i] = new PathMatchPredicate(paths[i]); } return or(predicates); }