11package org .hamcrest .core ;
22
3+ import org .hamcrest .Description ;
4+ import org .hamcrest .Matcher ;
5+
36import java .util .ArrayList ;
47import java .util .Arrays ;
58import java .util .List ;
69
7- import org .hamcrest .Description ;
8- import org .hamcrest .Factory ;
9- import org .hamcrest .Matcher ;
10-
1110/**
1211 * Calculates the logical disjunction of multiple matchers. Evaluation is shortcut, so
1312 * subsequent matchers are not called if an earlier matcher returns <code>true</code>.
@@ -33,7 +32,6 @@ public void describeTo(Description description) {
3332 * For example:
3433 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
3534 */
36- @ Factory
3735 public static <T > AnyOf <T > anyOf (Iterable <Matcher <? super T >> matchers ) {
3836 return new AnyOf <T >(matchers );
3937 }
@@ -43,7 +41,6 @@ public static <T> AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers) {
4341 * For example:
4442 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
4543 */
46- @ Factory
4744 public static <T > AnyOf <T > anyOf (Matcher <? super T >... matchers ) {
4845 return anyOf (Arrays .asList (matchers ));
4946 }
@@ -53,7 +50,6 @@ public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers) {
5350 * For example:
5451 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
5552 */
56- @ Factory
5753 public static <T > AnyOf <T > anyOf (Matcher <T > first , Matcher <? super T > second ) {
5854 List <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T >>();
5955 matchers .add (first );
@@ -66,7 +62,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second) {
6662 * For example:
6763 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
6864 */
69- @ Factory
7065 public static <T > AnyOf <T > anyOf (Matcher <T > first , Matcher <? super T > second , Matcher <? super T > third ) {
7166 List <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T >>();
7267 matchers .add (first );
@@ -80,7 +75,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
8075 * For example:
8176 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
8277 */
83- @ Factory
8478 public static <T > AnyOf <T > anyOf (Matcher <T > first , Matcher <? super T > second , Matcher <? super T > third , Matcher <? super T > fourth ) {
8579 List <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T >>();
8680 matchers .add (first );
@@ -95,7 +89,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
9589 * For example:
9690 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
9791 */
98- @ Factory
9992 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 ) {
10093 List <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T >>();
10194 matchers .add (first );
@@ -111,7 +104,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
111104 * For example:
112105 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
113106 */
114- @ Factory
115107 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 ) {
116108 List <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T >>();
117109 matchers .add (first );
0 commit comments