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)
| 279 | * @since 14.0 |
| 280 | */ |
| 281 | public static <C extends Comparable<?>> Range<C> downTo(C endpoint, BoundType boundType) { |
| 282 | switch (boundType) { |
| 283 | case OPEN: |
| 284 | return greaterThan(endpoint); |
| 285 | case CLOSED: |
| 286 | return atLeast(endpoint); |
| 287 | default: |
| 288 | throw new AssertionError(); |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | private static final Range<Comparable> ALL = |
| 293 | new Range<Comparable>(Cut.belowAll(), Cut.aboveAll()); |
no test coverage detected