Home | History | Annotate | Download | only in collection

Lines Matching defs:array

10  * Matcher for array whose elements satisfy a sequence of matchers.
11 * The array size must equal the number of element matchers.
21 public boolean matchesSafely(T[] array) {
22 if (array.length != elementMatchers.length) return false;
24 for (int i = 0; i < array.length; i++) {
25 if (!elementMatchers[i].matches(array[i])) return false;
34 mismatchDescription.appendText("array length was ").appendValue(actual.length);
85 * positively only if the number of matchers specified is equal to the length of the examined array and
86 * each matcher[i] is satisfied by array[i].
88 * <pre>assertThat(new Integer[]{1,2,3}, is(array(equalTo(1), equalTo(2), equalTo(3))))</pre>
93 public static <T> IsArray<T> array(Matcher<? super T>... elementMatchers) {