Interface Filter<T>

All Superinterfaces:<T>, Predicate<T>
All Known Subinterfaces:
All Known Implementing Classes:
AbstractFilter, BinaryParser, ContentTypeStartsWith, DigestEquals, DuplicateSegmentsLessThan, HostEndsWith, HostEquals, HTMLParser, IsHttpResponse, IsProbablyBinary, PathEndsWithOneOf, SchemeEquals, StatusCategory, URLEquals, URLMatchesRegex, URLShorterThan

public interface Filter<T>
A filter is a strategy to decide whether to accept a given object or not. Typically T will be either BURL or Response. Technically it is identical to the Google Guava Predicate interface, but there are some conventions listed below that apply only to filters.

By contract, every filter that is an instance of a non-anonymous filter class is supposed to have a static method with the following signature

public static Filter<T> valueOf(String x)
that returns a filter (typically, a filter of its own kind) from a string. Moreover, it is required, for every filter class F and for every instance f, that toString() returns

Note that classname can omit the package name if it is FILTER_PACKAGE_NAME.

  • Field Summary

    Modifier and Type Field Description
    static String FILTER_PACKAGE_NAME
    The name of the package that contains this interface as well as most filters.
  • Method Summary

    Methods inherited from interface

    apply, equals, test

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Field Details


      static final String FILTER_PACKAGE_NAME
      The name of the package that contains this interface as well as most filters.