com.google.common.base.Predicate<WarcRecord>
, Filter<WarcRecord>
, FlyweightPrototype<Filter<WarcRecord>>
, java.util.function.Predicate<WarcRecord>
public class DigestEquals extends AbstractFilter<WarcRecord>
FILTER_PACKAGE_NAME
Modifier and Type | Method | Description |
---|---|---|
boolean |
apply(WarcRecord x) |
Apply the filter to a given WarcRecord
|
Filter<WarcRecord> |
copy() |
|
java.lang.String |
toString() |
A string representation of the state of this object, that is just the digest allowed.
|
static DigestEquals |
valueOf(java.lang.String spec) |
Get a new
DigestEquals that will accept only WarcRecord whose digest is a given string |
toString
public boolean apply(WarcRecord x)
x
- the WarcRecord to be filteredtrue
if the WarcHeader.Name.WARC_PAYLOAD_DIGEST
of the WarcHeader
of x
is not null and equal to the inner digest (hexadecimal comparison)public static DigestEquals valueOf(java.lang.String spec)
DigestEquals
that will accept only WarcRecord
whose digest is a given stringspec
- a string, that will be used to compare digests.DigestEquals
that will accept only WarcRecord
whose digest is spec
public java.lang.String toString()
toString
in class java.lang.Object
public Filter<WarcRecord> copy()