diff --git a/hamcrest/src/main/java/org/hamcrest/Matchers.java b/hamcrest/src/main/java/org/hamcrest/Matchers.java index d4f543ea..e4a4bd50 100644 --- a/hamcrest/src/main/java/org/hamcrest/Matchers.java +++ b/hamcrest/src/main/java/org/hamcrest/Matchers.java @@ -1299,7 +1299,7 @@ public static org.hamcrest.Matcher closeTo(java.math.BigDe * * @param value the value which, when passed to the compareTo method of the examined object, should return zero */ - public static > org.hamcrest.Matcher comparesEqualTo(T value) { + public static > org.hamcrest.Matcher comparesEqualTo(T value) { return org.hamcrest.number.OrderingComparison.comparesEqualTo(value); } @@ -1313,7 +1313,7 @@ public static > org.hamcrest.Matcher compar * @param value the value which, when passed to the compareTo method of the examined object, should return greater * than zero */ - public static > org.hamcrest.Matcher greaterThan(T value) { + public static > org.hamcrest.Matcher greaterThan(T value) { return org.hamcrest.number.OrderingComparison.greaterThan(value); } @@ -1327,7 +1327,7 @@ public static > org.hamcrest.Matcher greate * @param value the value which, when passed to the compareTo method of the examined object, should return greater * than or equal to zero */ - public static > org.hamcrest.Matcher greaterThanOrEqualTo(T value) { + public static > org.hamcrest.Matcher greaterThanOrEqualTo(T value) { return org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo(value); } @@ -1341,7 +1341,7 @@ public static > org.hamcrest.Matcher greate * @param value the value which, when passed to the compareTo method of the examined object, should return less * than zero */ - public static > org.hamcrest.Matcher lessThan(T value) { + public static > org.hamcrest.Matcher lessThan(T value) { return org.hamcrest.number.OrderingComparison.lessThan(value); } @@ -1355,7 +1355,7 @@ public static > org.hamcrest.Matcher lessTh * @param value the value which, when passed to the compareTo method of the examined object, should return less * than or equal to zero */ - public static > org.hamcrest.Matcher lessThanOrEqualTo(T value) { + public static > org.hamcrest.Matcher lessThanOrEqualTo(T value) { return org.hamcrest.number.OrderingComparison.lessThanOrEqualTo(value); } diff --git a/hamcrest/src/main/java/org/hamcrest/comparator/ComparatorMatcherBuilder.java b/hamcrest/src/main/java/org/hamcrest/comparator/ComparatorMatcherBuilder.java index cf522113..ef810bfb 100644 --- a/hamcrest/src/main/java/org/hamcrest/comparator/ComparatorMatcherBuilder.java +++ b/hamcrest/src/main/java/org/hamcrest/comparator/ComparatorMatcherBuilder.java @@ -18,7 +18,7 @@ public final class ComparatorMatcherBuilder { * For example: *
assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().lessThanOrEqualTo(1))
*/ - public static > ComparatorMatcherBuilder usingNaturalOrdering() { + public static > ComparatorMatcherBuilder usingNaturalOrdering() { return new ComparatorMatcherBuilder(new Comparator() { @Override public int compare(T o1, T o2) { diff --git a/hamcrest/src/main/java/org/hamcrest/number/OrderingComparison.java b/hamcrest/src/main/java/org/hamcrest/number/OrderingComparison.java index 8a77713d..69410b2c 100644 --- a/hamcrest/src/main/java/org/hamcrest/number/OrderingComparison.java +++ b/hamcrest/src/main/java/org/hamcrest/number/OrderingComparison.java @@ -17,7 +17,7 @@ private OrderingComparison() { * * @param value the value which, when passed to the compareTo method of the examined object, should return zero */ - public static > Matcher comparesEqualTo(T value) { + public static > Matcher comparesEqualTo(T value) { return ComparatorMatcherBuilder.usingNaturalOrdering().comparesEqualTo(value); } @@ -31,7 +31,7 @@ public static > Matcher comparesEqualTo(T value) { * @param value the value which, when passed to the compareTo method of the examined object, should return greater * than zero */ - public static > Matcher greaterThan(T value) { + public static > Matcher greaterThan(T value) { return ComparatorMatcherBuilder.usingNaturalOrdering().greaterThan(value); } @@ -45,7 +45,7 @@ public static > Matcher greaterThan(T value) { * @param value the value which, when passed to the compareTo method of the examined object, should return greater * than or equal to zero */ - public static > Matcher greaterThanOrEqualTo(T value) { + public static > Matcher greaterThanOrEqualTo(T value) { return ComparatorMatcherBuilder.usingNaturalOrdering().greaterThanOrEqualTo(value); } @@ -59,7 +59,7 @@ public static > Matcher greaterThanOrEqualTo(T value) * @param value the value which, when passed to the compareTo method of the examined object, should return less * than zero */ - public static > Matcher lessThan(T value) { + public static > Matcher lessThan(T value) { return ComparatorMatcherBuilder.usingNaturalOrdering().lessThan(value); } @@ -73,7 +73,7 @@ public static > Matcher lessThan(T value) { * @param value the value which, when passed to the compareTo method of the examined object, should return less * than or equal to zero */ - public static > Matcher lessThanOrEqualTo(T value) { + public static > Matcher lessThanOrEqualTo(T value) { return ComparatorMatcherBuilder.usingNaturalOrdering().lessThanOrEqualTo(value); } }