File tree Expand file tree Collapse file tree
hamcrest-core/src/main/java/org/hamcrest/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,20 +28,20 @@ public void describeTo(Description description) {
2828 describeTo (description , "and" );
2929 }
3030
31- /**
31+ /**
3232 * Evaluates to true only if ALL of the passed in matchers evaluate to true.
3333 */
3434 @ Factory
35- public static <T > Matcher <T > allOf (Matcher <? super T >... matchers ) {
36- return allOf ( Arrays . asList ( matchers ) );
35+ public static <T > Matcher <T > allOf (Iterable < Matcher <? super T >> matchers ) {
36+ return new AllOf < T >( matchers );
3737 }
3838
39- /**
39+ /**
4040 * Evaluates to true only if ALL of the passed in matchers evaluate to true.
4141 */
4242 @ Factory
43- public static <T > Matcher <T > allOf (Iterable < Matcher <? super T >> matchers ) {
44- return new AllOf < T >( matchers );
43+ public static <T > Matcher <T > allOf (Matcher <? super T >... matchers ) {
44+ return allOf ( Arrays . asList ( matchers ) );
4545 }
4646
4747 /**
Original file line number Diff line number Diff line change @@ -28,14 +28,6 @@ public void describeTo(Description description) {
2828 describeTo (description , "or" );
2929 }
3030
31- /**
32- * Evaluates to true if ANY of the passed in matchers evaluate to true.
33- */
34- @ Factory
35- public static <T > Matcher <T > anyOf (Matcher <? super T >... matchers ) {
36- return anyOf (Arrays .asList (matchers ));
37- }
38-
3931 /**
4032 * Evaluates to true if ANY of the passed in matchers evaluate to true.
4133 */
@@ -44,6 +36,14 @@ public static <T> Matcher<T> anyOf(Iterable<Matcher<? super T>> matchers) {
4436 return new AnyOf <T >(matchers );
4537 }
4638
39+ /**
40+ * Evaluates to true if ANY of the passed in matchers evaluate to true.
41+ */
42+ @ Factory
43+ public static <T > Matcher <T > anyOf (Matcher <? super T >... matchers ) {
44+ return anyOf (Arrays .asList (matchers ));
45+ }
46+
4747 /**
4848 * Evaluates to true if ANY of the passed in matchers evaluate to true.
4949 */
You can’t perform that action at this time.
0 commit comments