This commit is contained in:
Gary Gregory 2022-10-17 05:54:19 -04:00
parent a21fd72f85
commit 6c3ffa44ff

View File

@ -57,7 +57,7 @@ public int compare(final Object obj1, final Object obj2) {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Obtains a range with the specified minimum and maximum values (both inclusive). * Creates a range with the specified minimum and maximum values (both inclusive).
* *
* <p>The range uses the natural ordering of the elements to determine where * <p>The range uses the natural ordering of the elements to determine where
* values lie in the range.</p> * values lie in the range.</p>
@ -77,7 +77,7 @@ public static <T extends Comparable<? super T>> Range<T> between(final T fromInc
} }
/** /**
* Obtains a range with the specified minimum and maximum values (both inclusive). * Creates a range with the specified minimum and maximum values (both inclusive).
* *
* <p>The range uses the specified {@link Comparator} to determine where * <p>The range uses the specified {@link Comparator} to determine where
* values lie in the range.</p> * values lie in the range.</p>
@ -98,7 +98,7 @@ public static <T> Range<T> between(final T fromInclusive, final T toInclusive, f
} }
/** /**
* Obtains a range using the specified element as both the minimum * Creates a range using the specified element as both the minimum
* and maximum in this range. * and maximum in this range.
* *
* <p>The range uses the natural ordering of the elements to determine where * <p>The range uses the natural ordering of the elements to determine where
@ -115,7 +115,7 @@ public static <T extends Comparable<? super T>> Range<T> is(final T element) {
} }
/** /**
* Obtains a range using the specified element as both the minimum * Creates a range using the specified element as both the minimum
* and maximum in this range. * and maximum in this range.
* *
* <p>The range uses the specified {@link Comparator} to determine where * <p>The range uses the specified {@link Comparator} to determine where
@ -165,7 +165,7 @@ public static <T> Range<T> is(final T element, final Comparator<T> comparator) {
* @param comp the comparator to be used, null for natural ordering * @param comp the comparator to be used, null for natural ordering
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private Range(final T element1, final T element2, final Comparator<T> comp) { Range(final T element1, final T element2, final Comparator<T> comp) {
if (element1 == null || element2 == null) { if (element1 == null || element2 == null) {
throw new IllegalArgumentException("Elements in a range must not be null: element1=" + throw new IllegalArgumentException("Elements in a range must not be null: element1=" +
element1 + ", element2=" + element2); element1 + ", element2=" + element2);