Class SchemeEquals

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

public class SchemeEquals
extends AbstractFilter<URI>
Accepts only URIs whose scheme equals a certain string (typically, http).

Note that apply(URI) will throw an IllegalArgumentException if the argument has a null scheme.

  • Constructor Details

    • SchemeEquals

      public SchemeEquals​(String scheme)
      Creates a filter that only accepts URIs with a given scheme.
      Parameters:
      scheme - the accepted scheme.
  • Method Details

    • apply

      public boolean apply​(URI uri)
    • valueOf

      public static SchemeEquals 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