Interface Matcher<T>

All Known Implementing Classes:
AbstractMatcher

public interface Matcher<T>
Returns true or false for a given input.
Author:
crazybob@google.com (Bob Lee)
  • Method Summary

    Modifier and Type
    Method
    Description
    default Matcher<T>
    and(Matcher<? super T> other)
    Returns a new matcher which returns true if both this and the given matcher return true.
    boolean
    Returns true if this matches t, false otherwise.
    default Matcher<T>
    or(Matcher<? super T> other)
    Returns a new matcher which returns true if either this or the given matcher return true.
  • Method Details

    • matches

      boolean matches(T t)
      Returns true if this matches t, false otherwise.
    • and

      default Matcher<T> and(Matcher<? super T> other)
      Returns a new matcher which returns true if both this and the given matcher return true.
    • or

      default Matcher<T> or(Matcher<? super T> other)
      Returns a new matcher which returns true if either this or the given matcher return true.