src/main/java/org/owasp/url/UrlClassifierBuilder.java
public UrlClassifier build() {
    ImmutableSet<UrlValue.CornerCase> toleratedCornerCaseSet =
        Sets.immutableEnumSet(this.toleratedCornerCases);
    ImmutableSet<Scheme> allowedSchemeSet = allowedSchemes.build();
    MediaTypeClassifier mtc = mediaTypeClassifier != null
        ? mediaTypeClassifier
        : MediaTypeClassifiers.or();
    AuthorityClassifier ac = authorityClassifier != null
        ? authorityClassifier
        : AuthorityClassifiers.any();
    ImmutableSet<String> positivePathGlobSet = positivePathGlobs.build();
    ImmutableSet<String> negativePathGlobSet = negativePathGlobs.build();
    Pattern positivePathPattern = positivePathGlobSet.isEmpty()
        ? null
        : PathGlobs.toPattern(positivePathGlobSet);
    Pattern negativePathPattern = negativePathGlobSet.isEmpty()
        ? null
        : PathGlobs.toPattern(negativePathGlobSet);
    QueryClassifier qc = queryClassifier != null
        ? queryClassifier
        : QueryClassifiers.any();
    FragmentClassifier fc = fragmentClassifier != null
        ? fragmentClassifier
        : FragmentClassifiers.any();
    ContentClassifier cc = contentClassifier != null
        ? contentClassifier
        : ContentClassifiers.any();

    return new UrlClassifierImpl(
        toleratedCornerCaseSet,
        allowedSchemeSet,
        mtc,
        ac,
        positivePathPattern,
        negativePathPattern,
        qc,
        fc,
        cc
        );
  }
/**
   * Builds a classifier based on previous allow/match decisions.
   * This may be reused after a call to build and subsequent calls to
   * allow/match methods will not affect previously built classifiers.
   * @return this
   */
Builds a classifier based on previous allow/match decisions.
This may be reused after a call to build and subsequent calls to
allow/match methods will not affect previously built classifiers.
@return this
Builds a classifier based on previous allow / match decisions . This may be reused after a call to build and subsequent calls to allow / match methods will not affect previously built classifiers . @return this
public UrlClassifier build() {
    ImmutableSet<UrlValue.CornerCase> toleratedCornerCaseSet =
        Sets.immutableEnumSet(this.toleratedCornerCases);
    ImmutableSet<Scheme> allowedSchemeSet = allowedSchemes.build();
    MediaTypeClassifier mtc = mediaTypeClassifier != null
        ? mediaTypeClassifier
        : MediaTypeClassifiers.or();
    AuthorityClassifier ac = authorityClassifier != null
        ? authorityClassifier
        : AuthorityClassifiers.any();
    ImmutableSet<String> positivePathGlobSet = positivePathGlobs.build();
    ImmutableSet<String> negativePathGlobSet = negativePathGlobs.build();
    Pattern positivePathPattern = positivePathGlobSet.isEmpty()
        ? null
        : PathGlobs.toPattern(positivePathGlobSet);
    Pattern negativePathPattern = negativePathGlobSet.isEmpty()
        ? null
        : PathGlobs.toPattern(negativePathGlobSet);
    QueryClassifier qc = queryClassifier != null
        ? queryClassifier
        : QueryClassifiers.any();
    FragmentClassifier fc = fragmentClassifier != null
        ? fragmentClassifier
        : FragmentClassifiers.any();
    ContentClassifier cc = contentClassifier != null
        ? contentClassifier
        : ContentClassifiers.any();
    return new UrlClassifierImpl(
        toleratedCornerCaseSet,
        allowedSchemeSet,
        mtc,
        ac,
        positivePathPattern,
        negativePathPattern,
        qc,
        fc,
        cc
        );
  }
public UrlClassifier build ( ) { ImmutableSet < UrlValue . CornerCase > toleratedCornerCaseSet = Sets . immutableEnumSet ( this . toleratedCornerCases ) ; ImmutableSet < Scheme > allowedSchemeSet = allowedSchemes . build ( ) ; MediaTypeClassifier mtc = mediaTypeClassifier != null ? mediaTypeClassifier : MediaTypeClassifiers . or ( ) ; AuthorityClassifier ac = authorityClassifier != null ? authorityClassifier : AuthorityClassifiers . any ( ) ; ImmutableSet < String > positivePathGlobSet = positivePathGlobs . build ( ) ; ImmutableSet < String > negativePathGlobSet = negativePathGlobs . build ( ) ; Pattern positivePathPattern = positivePathGlobSet . isEmpty ( ) ? null : PathGlobs . toPattern ( positivePathGlobSet ) ; Pattern negativePathPattern = negativePathGlobSet . isEmpty ( ) ? null : PathGlobs . toPattern ( negativePathGlobSet ) ; QueryClassifier qc = queryClassifier != null ? queryClassifier : QueryClassifiers . any ( ) ; FragmentClassifier fc = fragmentClassifier != null ? fragmentClassifier : FragmentClassifiers . any ( ) ; ContentClassifier cc = contentClassifier != null ? contentClassifier : ContentClassifiers . any ( ) ; return new UrlClassifierImpl ( toleratedCornerCaseSet , allowedSchemeSet , mtc , ac , positivePathPattern , negativePathPattern , qc , fc , cc ) ; }
Builds a classifier based on previous allow/match decisions.
Builds a classifier based on previous allow / match decisions .