NumberRange for Longs.
This class is not designed to interoperate with other NumberRanges
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the minimum, the element, or the maximum depending on the element's location relative to the range.the element to test. element)Overrides org. Fits the given value into this range by returning the given value or, if out of bounds, the range minimum if below, or the range maximum if above. |
| public static LongRange | Returns: the range object, not null.the first value that defines the edge of the range, inclusive. fromInclusive, final long the second value that defines the edge of the range, inclusive. toInclusive)Hides org. Creates a closed range with the specified minimum and maximum values (both inclusive). |
| public static LongRange | Returns: the range object, not null.the first value that defines the edge of the range, inclusive. fromInclusive, final Long the second value that defines the edge of the range, inclusive. toInclusive)Hides org. Creates a closed range with the specified minimum and maximum values (both inclusive). |
| public LongStream | Returns: a sequentialLongStream for the range of long elementsReturns a sequential ordered |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| LongRange | back to summary |
|---|---|
| private LongRange(final Long number1, final Long number2) Creates a new instance.
| |
| fit | back to summary |
|---|---|
| public long fit(final long element) Overrides org. Fits the given value into this range by returning the given value or, if out of bounds, the range minimum if below, or the range maximum if above.
| |
| of | back to summary |
|---|---|
| public static LongRange of(final long fromInclusive, final long toInclusive) Hides org. Creates a closed range with the specified minimum and maximum values (both inclusive). The range uses the natural ordering of the elements to determine where values lie in the range. The arguments may be passed in the order (min,max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
| |
| of | back to summary |
|---|---|
| public static LongRange of(final Long fromInclusive, final Long toInclusive) Hides org. Creates a closed range with the specified minimum and maximum values (both inclusive). The range uses the natural ordering of the elements to determine where values lie in the range. The arguments may be passed in the order (min,max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
| |
| toLongStream | back to summary |
|---|---|
| public LongStream toLongStream() Returns a sequential ordered
| |