Class URLShorterThan

java.lang.Object
it.unimi.dsi.law.warc.filters.AbstractFilter<URI>
it.unimi.dsi.law.warc.filters.URLShorterThan
All Implemented Interfaces:
com.google.common.base.Predicate<URI>, Filter<URI>, Predicate<URI>

public class URLShorterThan
extends AbstractFilter<URI>
Accepts only URIs whose overall length is below a given threshold.
  • Constructor Details

    • URLShorterThan

      public URLShorterThan​(int threshold)
      Creates a filter that only accepts URLs shorter than the given threshold.
      Parameters:
      threshold - the acceptance threshold.
  • Method Details

    • apply

      public boolean apply​(URI uri)
    • valueOf

      public static URLShorterThan valueOf​(String spec)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals​(Object x)
      Specified by:
      equals in interface com.google.common.base.Predicate<URI>
      Overrides:
      equals in class Object