Interface Matcher<A,B>

Type Parameters:
A - the criteria object
B - the object being tested
All Superinterfaces:
BiPredicate<A,B>
All Known Implementing Classes:
AbstractTypeMatcher
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Matcher<A,B> extends BiPredicate<A,B>
A BiPredicate with particular semantics associated with its test(Object, Object) method.
Author:
Laird Nelson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(A a, B b)
    Returns true if and only if the second argument matches the first argument.

    Methods inherited from interface BiPredicate

    and, negate, or
  • Method Details

    • test

      boolean test(A a, B b)
      Returns true if and only if the second argument matches the first argument.

      The order of arguments may therefore be significant for Matcher implementations that do not represent equality tests.

      Specified by:
      test in interface BiPredicate<A,B>
      Parameters:
      a - an object serving as a kind of criteria; must not be null
      b - an object to test against the criteria; must not be null
      Returns:
      true if and only if the second argument matches the first argument; false otherwise
      Throws:
      NullPointerException - if either a or b is null
      IllegalArgumentException - if either non-null argument is unsuitable for any reason