Returns a range from the given endpoint, which may be either inclusive (closed) or exclusive (open), with no upper bound. @since 14.0
(C endpoint, BoundType boundType)
| 261 | * @since 14.0 |
| 262 | */ |
| 263 | public static <C extends Comparable<?>> Range<C> downTo(C endpoint, BoundType boundType) { |
| 264 | switch (boundType) { |
| 265 | case OPEN: |
| 266 | return greaterThan(endpoint); |
| 267 | case CLOSED: |
| 268 | return atLeast(endpoint); |
| 269 | } |
| 270 | throw new AssertionError(); |
| 271 | } |
| 272 | |
| 273 | private static final Range<Comparable> ALL = new Range<>(Cut.belowAll(), Cut.aboveAll()); |
| 274 |