Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open). @since 14.0
(C endpoint, BoundType boundType)
| 251 | |
| 252 | |
| 253 | public static <C extends Comparable<?>> Range<C> upTo(C endpoint, BoundType boundType) { |
| 254 | switch (boundType) { |
| 255 | case OPEN: |
| 256 | return lessThan(endpoint); |
| 257 | case CLOSED: |
| 258 | return atMost(endpoint); |
| 259 | default: |
| 260 | throw new AssertionError(); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Returns a range that contains all values strictly greater than {@code |
no test coverage detected