Class PairMatcher<L,R>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Pair<? extends L,? extends R>>
org.dmfs.jems2.hamcrest.matchers.pair.PairMatcher<L,R>
All Implemented Interfaces:
org.hamcrest.Matcher<org.dmfs.jems2.Pair<? extends L,? extends R>>, org.hamcrest.SelfDescribing

public final class PairMatcher<L,R> extends org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Pair<? extends L,? extends R>>
Matcher for Pair.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PairMatcher(org.hamcrest.Matcher<? super L> leftValueMatcher, org.hamcrest.Matcher<? super R> rightValueMatcher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    protected boolean
    matchesSafely(org.dmfs.jems2.Pair<? extends L,? extends R> actualPair, org.hamcrest.Description mismatchDescription)
     
    static <L, R> org.hamcrest.Matcher<org.dmfs.jems2.Pair<? extends L,? extends R>>
    pair(L leftValue, R rightValue)
    Matcher that matches when the provided left and right value equals() to actual Pairs left and right value.
    static <L, R> org.hamcrest.Matcher<org.dmfs.jems2.Pair<? extends L,? extends R>>
    pair(org.hamcrest.Matcher<? super L> leftValueMatcher, org.hamcrest.Matcher<? super R> rightValueMatcher)
    Matcher that matches when the provided Matchers for the left and right value match with the Pairs left and right value.

    Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher

    describeMismatch, matches

    Methods inherited from class org.hamcrest.BaseMatcher

    _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PairMatcher

      public PairMatcher(org.hamcrest.Matcher<? super L> leftValueMatcher, org.hamcrest.Matcher<? super R> rightValueMatcher)
  • Method Details

    • matchesSafely

      protected boolean matchesSafely(org.dmfs.jems2.Pair<? extends L,? extends R> actualPair, org.hamcrest.Description mismatchDescription)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Pair<? extends L,? extends R>>
    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • pair

      public static <L, R> org.hamcrest.Matcher<org.dmfs.jems2.Pair<? extends L,? extends R>> pair(L leftValue, R rightValue)
      Matcher that matches when the provided left and right value equals() to actual Pairs left and right value.
    • pair

      public static <L, R> org.hamcrest.Matcher<org.dmfs.jems2.Pair<? extends L,? extends R>> pair(org.hamcrest.Matcher<? super L> leftValueMatcher, org.hamcrest.Matcher<? super R> rightValueMatcher)
      Matcher that matches when the provided Matchers for the left and right value match with the Pairs left and right value.