Package it.unimi.dsi.law.warc.filters
Class StatusCategory
java.lang.Object
it.unimi.dsi.law.warc.filters.AbstractFilter<HttpResponse>
it.unimi.dsi.law.warc.filters.StatusCategory
- All Implemented Interfaces:
com.google.common.base.Predicate<HttpResponse>
,Filter<HttpResponse>
,Predicate<HttpResponse>
public class StatusCategory extends AbstractFilter<HttpResponse>
Accepts only fetched response whose status category (status/100) has a certain value.
-
Field Summary
Fields inherited from interface it.unimi.dsi.law.warc.filters.Filter
FILTER_PACKAGE_NAME
-
Constructor Summary
Constructors Constructor Description StatusCategory(int category)
Creates a filter that only accepts responses of the given category. -
Method Summary
Modifier and Type Method Description boolean
apply(HttpResponse x)
boolean
equals(Object x)
String
toString()
static StatusCategory
valueOf(String spec)
Methods inherited from class it.unimi.dsi.law.warc.filters.AbstractFilter
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.base.Predicate
test
-
Constructor Details
-
StatusCategory
public StatusCategory(int category)Creates a filter that only accepts responses of the given category.- Parameters:
category
- the accepted category.
-
-
Method Details
-
apply
-
valueOf
-
toString
-
equals
- Specified by:
equals
in interfacecom.google.common.base.Predicate<HttpResponse>
- Overrides:
equals
in classObject
-