RangeInclusiveD@Immutable
public interface RangeInclusiveDType
double components.| Modifier and Type | Method | Description |
|---|---|---|
default void |
checkPreconditions() |
Check preconditions for the type.
|
default boolean |
includesValue(double value) |
Determine if the given value is included in this range.
|
default double |
interval() |
Retrieve the number of values in the range
[lower, upper]. |
default boolean |
isIncludedIn(RangeInclusiveD other) |
Determine if the given range is included in this range.
|
double |
lower() |
|
double |
upper() |
@Parameter double lower()
@Parameter double upper()
@Derived default double interval()
Retrieve the number of values in the range [lower, upper]. That
is, (upper - lower) + 1.
default boolean includesValue(double 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(RangeInclusiveD 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