FlyweightPrototype<Filter<T>>
, com.google.common.base.Predicate<T>
, java.util.function.Predicate<T>
Parser<T>
AbstractFilter
, BinaryParser
, ContentTypeStartsWith
, DigestEquals
, DuplicateSegmentsLessThan
, HostEndsWith
, HostEndsWithOneOf
, HostEquals
, HTMLParser
, IsHttpResponse
, IsProbablyBinary
, PathEndsWithOneOf
, ResponseMatches
, SameHost
, SchemeEquals
, StatusCategory
, URLEquals
, URLMatchesRegex
, URLShorterThan
public interface Filter<T> extends com.google.common.base.Predicate<T>, FlyweightPrototype<Filter<T>>
T
will be either a URI
, an
HttpResponse
or a URIResponse
. 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
classname(spec)where
f.equals(F.valueOf(spec))
Note that classname
can omit the package name if
it is FILTER_PACKAGE_NAME
.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
FILTER_PACKAGE_NAME |
The name of the package that contains this interface as well as
most filters.
|
copy