Returns a range that contains all values greater than or equal to {@code lower} and less than or equal to {@code upper}. @throws IllegalArgumentException if {@code lower} is greater than {@code upper} @throws ClassCastException if {@code lower} and {@code upper} are not mutually comparable @since 1
(C lower, C upper)
| 155 | * @since 14.0 |
| 156 | */ |
| 157 | public static <C extends Comparable<?>> Range<C> closed(C lower, C upper) { |
| 158 | return create(Cut.belowValue(lower), Cut.aboveValue(upper)); |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Returns a range that contains all values greater than or equal to {@code lower} and strictly |