Represents a mathematical range. See wikipedia article of interval.
adapted guava range class
Difference between the upper and lower bound of the Range.
Absolute length between upper and lower bound.
Returns true, if the value is within this Range bounds.
Returns Either.Right, if the value is contained within this Range.
Returns true, if the bounds of the other range do not extend the bounds of this range.
Returns true, if this range has a lower endpoint.
Returns true, if this range has an upper endpoint.
Returns the intersecting range of this range with the other connectedRange.
Returns true, if there exists a (possibly empty) range which is enclosed by both this range and other.
Returns true, if this range has the form v..v) or (v..v.
Returns the lower endpoint, if this range has one; otherwise null is returned.
Returns the lower endpoint as result.
Shift the Range so that the lower endpoint is represented by the value.
Returns the minimal range that encloses this and the other range. For example, the span of [1, 3) and 5, 7 is 1, 7.
Conversion to Guava range.
Returns the upper endpoint, if this range has one; otherwise null is returned.
Returns the upper endpoint as result.