File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
hamcrest-core/src/main/java/org/hamcrest/core
hamcrest-library/src/main/java/org/hamcrest/collection
hamcrest-unit-test/src/main Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 2
2
*/
3
3
package org .hamcrest .core ;
4
4
5
- import static org .hamcrest .core .IsEqual .equalTo ;
6
-
7
5
import org .hamcrest .BaseMatcher ;
8
6
import org .hamcrest .Description ;
9
7
import org .hamcrest .Factory ;
10
8
import org .hamcrest .Matcher ;
11
9
10
+ import static org .hamcrest .core .IsEqual .equalTo ;
11
+
12
12
13
13
/**
14
14
* Calculates the logical negation of a matcher.
@@ -44,7 +44,7 @@ public static <T> Matcher<T> not(Matcher<T> matcher) {
44
44
* vs. assertThat(cheese, is(not(smelly)))
45
45
*/
46
46
@ Factory
47
- public static <T > Matcher <? super T > not (T value ) {
47
+ public static <T > Matcher <T > not (T value ) {
48
48
return not (equalTo (value ));
49
49
}
50
50
}
Original file line number Diff line number Diff line change 1
1
package org .hamcrest .collection ;
2
2
3
- import static org .hamcrest .core .IsEqual .equalTo ;
4
-
5
- import java .util .Collection ;
6
-
7
3
import org .hamcrest .Factory ;
8
4
import org .hamcrest .FeatureMatcher ;
9
5
import org .hamcrest .Matcher ;
10
6
7
+ import java .util .Collection ;
8
+
9
+ import static org .hamcrest .core .IsEqual .equalTo ;
10
+
11
11
/**
12
12
* Matches if collection size satisfies a nested matcher.
13
13
*/
@@ -25,7 +25,7 @@ protected Integer featureValueOf(Collection<? extends E> actual) {
25
25
* Does collection size satisfy a given matcher?
26
26
*/
27
27
@ Factory
28
- public static <E > Matcher <? super Collection <? extends E >> hasSize (Matcher <? super Integer > size ) {
28
+ public static <E > Matcher <Collection <? extends E >> hasSize (Matcher <? super Integer > size ) {
29
29
return new IsCollectionWithSize <E >(size );
30
30
}
31
31
@@ -37,7 +37,7 @@ public static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? sup
37
37
* vs. assertThat(hasSize(x))
38
38
*/
39
39
@ Factory
40
- public static <E > Matcher <? super Collection <? extends E >> hasSize (int size ) {
40
+ public static <E > Matcher <Collection <? extends E >> hasSize (int size ) {
41
41
Matcher <? super Integer > matcher = equalTo (size );
42
42
return IsCollectionWithSize .<E >hasSize (matcher );
43
43
}
Original file line number Diff line number Diff line change 12
12
<orderEntry type =" module" module-name =" hamcrest-generator" />
13
13
<orderEntry type =" module" module-name =" hamcrest-integration" />
14
14
<orderEntry type =" library" name =" integration" level =" project" />
15
+ <orderEntry type =" library" scope =" TEST" name =" ant-output" level =" project" />
15
16
</component >
16
17
</module >
17
18
You can’t perform that action at this time.
0 commit comments