Class MismatchMatcher<V,T extends org.hamcrest.Matcher<? super V>>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<T>
org.dmfs.jems2.hamcrest.matchers.matcher.MismatchMatcher<V,T>
All Implemented Interfaces:
org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

public final class MismatchMatcher<V,T extends org.hamcrest.Matcher<? super V>> extends org.hamcrest.TypeSafeDiagnosingMatcher<T>
A Matcher to check if another Matcher mismatches a specific value with a specific description.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MismatchMatcher(V mismatchItem, org.hamcrest.Matcher<? super String> descriptionMatcher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    protected boolean
    matchesSafely(T item, org.hamcrest.Description mismatchDescription)
     

    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

    • MismatchMatcher

      public MismatchMatcher(V mismatchItem, org.hamcrest.Matcher<? super String> descriptionMatcher)
  • Method Details

    • matchesSafely

      protected boolean matchesSafely(T item, org.hamcrest.Description mismatchDescription)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeDiagnosingMatcher<T extends org.hamcrest.Matcher<? super V>>
    • describeTo

      public void describeTo(org.hamcrest.Description description)