Package nl.vpro.util
Class Ranges
java.lang.Object
nl.vpro.util.Ranges
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends Comparable<?>>
com.google.common.collect.Range<C>closedClosed
(@Nullable C start, @Nullable C stop) Creates onRange.closed(Comparable, Comparable)
range, but the arguments can benull
in which case unbounded ranges are createdstatic <C extends Comparable<?>>
com.google.common.collect.Range<C>closedOpen
(@Nullable C start, @Nullable C stop) Creates onRange.openClosed(Comparable, Comparable)
range, but the arguments can benull
in which case unbounded ranges are createdstatic <C extends Comparable<? super C>,
D extends Comparable<? super D>>
com.google.common.collect.Range<D>
-
Method Details
-
closedOpen
public static <C extends Comparable<?>> com.google.common.collect.Range<C> closedOpen(@Nullable C start, @Nullable C stop) Creates onRange.openClosed(Comparable, Comparable)
range, but the arguments can benull
in which case unbounded ranges are created- Throws:
IllegalArgumentException
- iflower
is greater thanupper
- Since:
- 2.29.1
- See Also:
-
Range.closedOpen(Comparable, Comparable)
-
closedClosed
public static <C extends Comparable<?>> com.google.common.collect.Range<C> closedClosed(@Nullable C start, @Nullable C stop) Creates onRange.closed(Comparable, Comparable)
range, but the arguments can benull
in which case unbounded ranges are created- Throws:
IllegalArgumentException
- iflower
is greater thanupper
- Since:
- 2.29.3
- See Also:
-
Range.closed(Comparable, Comparable)
-
convert
public static <C extends Comparable<? super C>,D extends Comparable<? super D>> com.google.common.collect.Range<D> convert(com.google.common.collect.Range<C> in, Function<C, D> convertor)
-