T - the type of the object to be matchedpublic final class ConjunctionMatcher<T>
extends org.hamcrest.TypeSafeDiagnosingMatcher<T>
This matcher differs from CoreMatchers.allOf and CoreMatchers.both in the following ways:
Use ComposeMatchers.compose to obtain instances of this class.
ComposeMatchers.compose(Matcher...)| Modifier and Type | Method and Description |
|---|---|
ConjunctionMatcher<T> |
and(org.hamcrest.Matcher<? super T> matcher)
Returns a composite matcher that comprises of this matcher logically ANDed with the specified matcher.
|
void |
describeTo(org.hamcrest.Description description) |
protected boolean |
matchesSafely(T actual,
org.hamcrest.Description mismatch) |
public ConjunctionMatcher<T> and(org.hamcrest.Matcher<? super T> matcher)
Note that this method returns a new matcher and does not modify this instance.
matcher - the matcher to logically AND to this matcherpublic void describeTo(org.hamcrest.Description description)
Copyright © 2015–2018. All rights reserved.