@Immutable public final class RangeInclusiveB extends Object
Immutable type representing an inclusive range with BigInteger
components.
| Constructor and Description |
|---|
RangeInclusiveB(BigInteger in_lower,
BigInteger in_upper)
Construct an inclusive range.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
BigInteger |
getInterval()
Retrieve the number of values in the range
[lower, upper]. |
BigInteger |
getLower() |
BigInteger |
getUpper() |
int |
hashCode() |
boolean |
includesValue(BigInteger value)
Determine if the given value is included in this range.
|
boolean |
isIncludedIn(RangeInclusiveB other)
Determine if the given range is included in this range.
|
String |
toString() |
public RangeInclusiveB(BigInteger in_lower, BigInteger in_upper)
lower <= upper.in_lower - The lower boundin_upper - The upper boundpublic BigInteger getInterval()
Retrieve the number of values in the range [lower, upper].
That is, (upper - lower) + 1.
public BigInteger getLower()
public BigInteger getUpper()
public boolean includesValue(BigInteger 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(RangeInclusiveB 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 © 2015 <code@io7m.com> http://io7m.com