RangeInclusiveL@Immutable
public interface RangeInclusiveLType
long components.| Modifier and Type | Method | Description |
|---|---|---|
default void |
checkPreconditions() |
Check preconditions for the type.
|
default boolean |
includesValue(long value) |
Determine if the given value is included in this range.
|
default long |
interval() |
Retrieve the number of values in the range
[lower, upper]. |
default boolean |
isIncludedIn(RangeInclusiveL other) |
Determine if the given range is included in this range.
|
long |
lower() |
|
long |
upper() |
@Parameter long lower()
@Parameter long upper()
@Derived default long interval()
Retrieve the number of values in the range [lower, upper]. That
is, (upper - lower) + 1.
default boolean includesValue(long value)
Determine if the given value is included in this range.
value - The given valuetrue iff value >= this.getLower() &&
value <= this.getUpper() .default boolean isIncludedIn(RangeInclusiveL other)
Determine if the given range is included in this range.
other - The given rangetrue iff this.getLower() >= other.getLower()
&& this.getUpper() <= other.getUpper() .@Check default void checkPreconditions()
Copyright © 2017 <code@io7m.com> http://io7m.com