Class AbstractFilter<T>

java.lang.Object
it.unimi.dsi.law.warc.filters.AbstractFilter<T>
All Implemented Interfaces:
com.google.common.base.Predicate<T>, Filter<T>, Predicate<T>
Direct Known Subclasses:
ContentTypeStartsWith, DigestEquals, DuplicateSegmentsLessThan, HostEndsWith, HostEquals, IsHttpResponse, IsProbablyBinary, PathEndsWithOneOf, SchemeEquals, StatusCategory, URLEquals, URLMatchesRegex, URLShorterThan

public abstract class AbstractFilter<T>
extends Object
implements Filter<T>
An abstract implementation of a Filter providing a method that helps in implementing properly Object.toString() for atomic (i.e., class-based) filters.
  • Constructor Details

    • AbstractFilter

      public AbstractFilter()
  • Method Details

    • toString

      protected String toString​(Object... arg)
      A helper method that generates a string version of this filter (mainly useful for atomic, i.e., class-based, filters).

      The output format is <classname>(<arg>, <arg>, ...) when <classname> is the simple filter class name, if the filter class belongs to the Filter.FILTER_PACKAGE_NAME package, or the fully qualified filter class name otherwise, and the arguments are the string representations of the arguments of this method.

      Parameters:
      arg - arguments for the string representation above.
      Returns:
      the string representation specified above.