Interface Matcher<T>

  • All Known Implementing Classes:
    AbstractMatcher

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

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

      • 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.