@@ -17,54 +17,11 @@ public static <T> org.hamcrest.Matcher<T> allOf(java.lang.Iterable<org.hamcrest.
1717 * For example:
1818 * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
1919 */
20+ @ SafeVarargs
2021 public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T >... matchers ) {
2122 return org .hamcrest .core .AllOf .allOf (matchers );
2223 }
2324
24- /**
25- * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
26- * For example:
27- * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
28- */
29- public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T > first , org .hamcrest .Matcher <? super T > second ) {
30- return org .hamcrest .core .AllOf .allOf (first , second );
31- }
32-
33- /**
34- * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
35- * For example:
36- * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
37- */
38- public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third ) {
39- return org .hamcrest .core .AllOf .allOf (first , second , third );
40- }
41-
42- /**
43- * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
44- * For example:
45- * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
46- */
47- public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth ) {
48- return org .hamcrest .core .AllOf .allOf (first , second , third , fourth );
49- }
50-
51- /**
52- * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
53- * For example:
54- * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
55- */
56- public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth , org .hamcrest .Matcher <? super T > fifth ) {
57- return org .hamcrest .core .AllOf .allOf (first , second , third , fourth , fifth );
58- }
59-
60- /**
61- * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
62- * For example:
63- * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
64- */
65- public static <T > org .hamcrest .Matcher <T > allOf (org .hamcrest .Matcher <? super T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth , org .hamcrest .Matcher <? super T > fifth , org .hamcrest .Matcher <? super T > sixth ) {
66- return org .hamcrest .core .AllOf .allOf (first , second , third , fourth , fifth , sixth );
67- }
6825
6926 /**
7027 * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
@@ -80,55 +37,11 @@ public static <T> org.hamcrest.core.AnyOf<T> anyOf(java.lang.Iterable<org.hamcre
8037 * For example:
8138 * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
8239 */
40+ @ SafeVarargs
8341 public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <? super T >... matchers ) {
8442 return org .hamcrest .core .AnyOf .anyOf (matchers );
8543 }
8644
87- /**
88- * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
89- * For example:
90- * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
91- */
92- public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <T > first , org .hamcrest .Matcher <? super T > second ) {
93- return org .hamcrest .core .AnyOf .anyOf (first , second );
94- }
95-
96- /**
97- * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
98- * For example:
99- * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
100- */
101- public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third ) {
102- return org .hamcrest .core .AnyOf .anyOf (first , second , third );
103- }
104-
105- /**
106- * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
107- * For example:
108- * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
109- */
110- public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth ) {
111- return org .hamcrest .core .AnyOf .anyOf (first , second , third , fourth );
112- }
113-
114- /**
115- * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
116- * For example:
117- * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
118- */
119- public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth , org .hamcrest .Matcher <? super T > fifth ) {
120- return org .hamcrest .core .AnyOf .anyOf (first , second , third , fourth , fifth );
121- }
122-
123- /**
124- * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
125- * For example:
126- * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
127- */
128- public static <T > org .hamcrest .core .AnyOf <T > anyOf (org .hamcrest .Matcher <T > first , org .hamcrest .Matcher <? super T > second , org .hamcrest .Matcher <? super T > third , org .hamcrest .Matcher <? super T > fourth , org .hamcrest .Matcher <? super T > fifth , org .hamcrest .Matcher <? super T > sixth ) {
129- return org .hamcrest .core .AnyOf .anyOf (first , second , third , fourth , fifth , sixth );
130- }
131-
13245 /**
13346 * Creates a matcher that matches when both of the specified matchers match the examined object.
13447 * For example:
@@ -271,6 +184,7 @@ public static <T> org.hamcrest.Matcher<java.lang.Iterable<? super T>> hasItem(T
271184 * @param itemMatchers
272185 * the matchers to apply to items provided by the examined {@link Iterable}
273186 */
187+ @ SafeVarargs
274188 public static <T > org .hamcrest .Matcher <java .lang .Iterable <T >> hasItems (org .hamcrest .Matcher <? super T >... itemMatchers ) {
275189 return org .hamcrest .core .IsCollectionContaining .hasItems (itemMatchers );
276190 }
@@ -286,6 +200,7 @@ public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItems(org.hamcr
286200 * @param items
287201 * the items to compare against the items provided by the examined {@link Iterable}
288202 */
203+ @ SafeVarargs
289204 public static <T > org .hamcrest .Matcher <java .lang .Iterable <T >> hasItems (T ... items ) {
290205 return org .hamcrest .core .IsCollectionContaining .hasItems (items );
291206 }
0 commit comments