public final class RangeInclusiveD extends Object
Immutable type representing an inclusive range with double
components.
| Constructor and Description |
|---|
RangeInclusiveD(double in_lower,
double in_upper)
Construct an inclusive range.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getInterval() |
double |
getLower() |
double |
getUpper() |
int |
hashCode() |
boolean |
includesValue(long value)
Determine if the given value is included in this range.
|
boolean |
isIncludedIn(RangeInclusiveD other)
Determine if the given range is included in this range.
|
String |
toString() |
public RangeInclusiveD(double in_lower,
double in_upper)
lower <= upper.in_lower - The lower boundin_upper - The upper boundpublic double getInterval()
upper and
lower bound, literally upper - lower.public double getLower()
public double getUpper()
public 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()
.public 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()
.Copyright © 2014 <code@io7m.com> http://io7m.com