Class UriPatternPredicate

java.lang.Object
org.eclipse.jetty.util.UriPatternPredicate
All Implemented Interfaces:
Predicate<URI>

public class UriPatternPredicate extends Object implements Predicate<URI>

Predicate for matching URI against a provided Regex Pattern

If the pattern is null and isNullInclusive is true, then all URIs will match.

A pattern is a set of acceptable URI names. Each acceptable name is a regex. Each regex can be separated by either a "," or a "|". If you use a "|" this or's together the URI name patterns. This means that ordering of the matches is unimportant to you. If instead, you want to match particular names, and you want to match them in order, you should separate the regexs with "," instead.

Eg "aaa-.*\\.jar|bbb-.*\\.jar" Will iterate over the jar names and match in any order.

Eg "aaa-*\\.jar,bbb-.*\\.jar" Will iterate over the jar names, matching all those starting with "aaa-" first, then "bbb-".

  • Constructor Details

    • UriPatternPredicate

      public UriPatternPredicate(String regex, boolean isNullInclusive)
    • UriPatternPredicate

      public UriPatternPredicate(Pattern pattern, boolean isNullInclusive)
  • Method Details