Matcher<T>, SelfDescribingpublic class AnyOf<T> extends BaseMatcher<T>
true.| Constructor | Description |
|---|---|
AnyOf(java.lang.Iterable<Matcher<? super T>> matchers) |
| Modifier and Type | Method | Description |
|---|---|---|
static <T> AnyOf<T> |
anyOf(java.lang.Iterable<Matcher<? super T>> matchers) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<? super T>... matchers) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<T> first,
Matcher<? super T> second) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
static <T> AnyOf<T> |
anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth) |
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
|
void |
describeTo(Description description) |
Generates a description of the object.
|
void |
describeTo(Description description,
java.lang.String operator) |
|
boolean |
matches(java.lang.Object o) |
Evaluates the matcher for argument item.
|
protected boolean |
matches(java.lang.Object o,
boolean shortcut) |
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toStringpublic boolean matches(java.lang.Object o)
Matchermatches in interface Matcher<T>o - the object against which the matcher is evaluated.true if item matches, otherwise false.BaseMatcherpublic void describeTo(Description description)
SelfDescribingdescribeTo in interface SelfDescribingdescription - The description to be built or appended to.public static <T> AnyOf<T> anyOf(java.lang.Iterable<Matcher<? super T>> matchers)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Matcher<? super T> third)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Matcher<? super T> third, Matcher<? super T> fourth)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Matcher<? super T> third, Matcher<? super T> fourth, Matcher<? super T> fifth)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Matcher<? super T> third, Matcher<? super T> fourth, Matcher<? super T> fifth, Matcher<? super T> sixth)
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))protected boolean matches(java.lang.Object o,
boolean shortcut)
public void describeTo(Description description, java.lang.String operator)