Interface Matcher<T>

All Known Implementing Classes:
AbstractMatcher

public interface Matcher<T>
Returns true or false for a given input.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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

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

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