Class PresentMatcher<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Optional<? extends T>>
org.dmfs.jems2.hamcrest.matchers.optional.PresentMatcher<T>
- All Implemented Interfaces:
org.hamcrest.Matcher<org.dmfs.jems2.Optional<? extends T>>,org.hamcrest.SelfDescribing
public final class PresentMatcher<T>
extends org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Optional<? extends T>>
A
Matcher to match the presence and value of an Optional.-
Constructor Summary
ConstructorsConstructorDescriptionPresentMatcher(org.hamcrest.Matcher<? super T> delegate) PresentMatcher(T expected) -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(org.hamcrest.Description description) protected booleanmatchesSafely(org.dmfs.jems2.Optional<? extends T> item, org.hamcrest.Description mismatchDescription) static <T> PresentMatcher<T>present()static <T> PresentMatcher<T>present(org.hamcrest.Matcher<? super T> delegate) static <T> PresentMatcher<T>present(T expectedValue) Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
PresentMatcher
public PresentMatcher() -
PresentMatcher
-
PresentMatcher
-
-
Method Details
-
present
-
present
-
present
-
matchesSafely
protected boolean matchesSafely(org.dmfs.jems2.Optional<? extends T> item, org.hamcrest.Description mismatchDescription) - Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Optional<? extends T>>
-
describeTo
public void describeTo(org.hamcrest.Description description)
-