| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Collection |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static <E> Matcher | containsInAnyOrder(final Matcher<? super E>
the matcher that must be satisfied by the single item provided by an
examined itemMatcher)Iterable
Deprecated
use contains(Matcher super E> itemMatcher) instead
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a single item that satisfies the specified matcher.
|
| public static <T> Matcher | containsInAnyOrder(Matcher<? super T>...
a list of matchers, each of which must be satisfied by an item provided by an examined itemMatchers)IterableCreates an order agnostic matcher for |
| public static <T> Matcher | containsInAnyOrder(T...
the items that must equal the items provided by an examined items)Iterable in any orderCreates an order agnostic matcher for |
| public static <T> Matcher | containsInAnyOrder(Collection<Matcher<? super T>>
a list of matchers, each of which must be satisfied by an item provided by an examined itemMatchers)IterableCreates an order agnostic matcher for |
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| protected boolean | matchesSafely(Iterable<? extends T> items, Description mismatchDescription)
Implements abstract org. |
| matchers | back to summary |
|---|---|
| private final Collection<Matcher<? super T>> matchers | |
| IsIterableContainingInAnyOrder | back to summary |
|---|---|
| public IsIterableContainingInAnyOrder(Collection<Matcher<? super T>> matchers) | |
| containsInAnyOrder | back to summary |
|---|---|
| public static <E> Matcher Deprecated use contains(Matcher super E> itemMatcher) instead Creates a matcher for For example: assertThat(Arrays.asList("foo"), containsInAnyOrder(equalTo("foo")))
| |
| containsInAnyOrder | back to summary |
|---|---|
| public static <T> Matcher Creates an order agnostic matcher for N.B. each of the specified matchers will only be used once during a given examination, so be careful when specifying matchers that may be satisfied by more than one entry in an examined iterable. For example: assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(equalTo("bar"), equalTo("foo")))
| |
| containsInAnyOrder | back to summary |
|---|---|
| public static <T> Matcher Creates an order agnostic matcher for N.B. each of the specified items will only be used once during a given examination, so be careful when specifying items that may be equal to more than one entry in an examined iterable. For example: assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder("bar", "foo"))
| |
| containsInAnyOrder | back to summary |
|---|---|
| public static <T> Matcher Creates an order agnostic matcher for N.B. each matcher in the specified collection will only be used once during a given examination, so be careful when specifying matchers that may be satisfied by more than one entry in an examined iterable. For example: assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
| |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| matchesSafely | back to summary |
|---|---|
| protected boolean matchesSafely(Iterable<? extends T> items, Description mismatchDescription) Implements abstract org. Doc from org. Subclasses should implement this. The item will already have been checked for the specific type and will never be null.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Collection | |
| private final Description |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| private boolean | |
| private boolean | |
| public boolean |
| matchers | back to summary |
|---|---|
| private final Collection<Matcher<? super S>> matchers | |
| mismatchDescription | back to summary |
|---|---|
| private final Description mismatchDescription | |
| Matching | back to summary |
|---|---|
| public Matching(Collection<Matcher<? super S>> matchers, Description mismatchDescription) | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished(Iterable<? extends S> items) | |
| isMatched | back to summary |
|---|---|
| private boolean isMatched(S item) | |
| isNotSurplus | back to summary |
|---|---|
| private boolean isNotSurplus(S item) | |
| matches | back to summary |
|---|---|
| public boolean matches(S item) | |