@@ -17,6 +17,8 @@ public final class ComparatorMatcherBuilder<T> {
1717 * Creates a matcher factory for matchers of {@code Comparable}s.
1818 * For example:
1919 * <pre>assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().lessThanOrEqualTo(1))</pre>
20+ *
21+ * @return The matcher.
2022 */
2123 public static <T extends Comparable <T >> ComparatorMatcherBuilder <T > usingNaturalOrdering () {
2224 return new ComparatorMatcherBuilder <T >(new Comparator <T >() {
@@ -35,6 +37,8 @@ public int compare(T o1, T o2) {
3537 * return -o1.compareTo(o2);
3638 * }
3739 * }).lessThan(4))</pre>
40+ *
41+ * @return The matcher.
3842 */
3943 public static <T > ComparatorMatcherBuilder <T > comparedBy (Comparator <T > comparator ) {
4044 return new ComparatorMatcherBuilder <T >(comparator , true );
@@ -115,6 +119,7 @@ private static String asText(int comparison) {
115119 * <pre>assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().comparesEqualTo(1))</pre>
116120 *
117121 * @param value the value which, when passed to the Comparator supplied to this builder, should return zero
122+ * @return The matcher.
118123 */
119124 public Matcher <T > comparesEqualTo (T value ) {
120125 return new ComparatorMatcher <T >(comparator , value , ComparatorMatcher .EQUAL , ComparatorMatcher .EQUAL , includeComparatorInDescription );
@@ -129,6 +134,7 @@ public Matcher<T> comparesEqualTo(T value) {
129134 *
130135 * @param value the value which, when passed to the Comparator supplied to this builder, should return greater
131136 * than zero
137+ * @return The matcher.
132138 */
133139 public Matcher <T > greaterThan (T value ) {
134140 return new ComparatorMatcher <T >(comparator , value , ComparatorMatcher .GREATER_THAN , ComparatorMatcher .GREATER_THAN , includeComparatorInDescription );
@@ -143,6 +149,7 @@ public Matcher<T> greaterThan(T value) {
143149 *
144150 * @param value the value which, when passed to the Comparator supplied to this builder, should return greater
145151 * than or equal to zero
152+ * @return The matcher.
146153 */
147154 public Matcher <T > greaterThanOrEqualTo (T value ) {
148155 return new ComparatorMatcher <T >(comparator , value , ComparatorMatcher .EQUAL , ComparatorMatcher .GREATER_THAN , includeComparatorInDescription );
@@ -157,6 +164,7 @@ public Matcher<T> greaterThanOrEqualTo(T value) {
157164 *
158165 * @param value the value which, when passed to the Comparator supplied to this builder, should return less
159166 * than zero
167+ * @return The matcher.
160168 */
161169 public Matcher <T > lessThan (T value ) {
162170 return new ComparatorMatcher <T >(comparator , value , ComparatorMatcher .LESS_THAN , ComparatorMatcher .LESS_THAN , includeComparatorInDescription );
@@ -171,6 +179,7 @@ public Matcher<T> lessThan(T value) {
171179 *
172180 * @param value the value which, when passed to the Comparator supplied to this builder, should return less
173181 * than or equal to zero
182+ * @return The matcher.
174183 */
175184 public Matcher <T > lessThanOrEqualTo (T value ) {
176185 return new ComparatorMatcher <T >(comparator , value , ComparatorMatcher .LESS_THAN , ComparatorMatcher .EQUAL , includeComparatorInDescription );
0 commit comments