RangeInclusiveBTypepublic final class RangeInclusiveB extends Object implements RangeInclusiveBType
BigInteger components.| Modifier and Type | Class | Description |
|---|---|---|
static class |
RangeInclusiveB.Builder |
Builds instances of type
RangeInclusiveB. |
| Modifier and Type | Method | Description |
|---|---|---|
static RangeInclusiveB.Builder |
builder() |
Creates a builder for
RangeInclusiveB. |
static RangeInclusiveB |
copyOf(RangeInclusiveBType instance) |
Creates an immutable copy of a
RangeInclusiveBType value. |
boolean |
equals(Object another) |
This instance is equal to all instances of
RangeInclusiveB that have equal attribute values. |
int |
hashCode() |
Computes a hash code from attributes:
lower, upper, interval. |
BigInteger |
interval() |
Retrieve the number of values in the range
[lower, upper]. |
BigInteger |
lower() |
|
static RangeInclusiveB |
of(BigInteger lower,
BigInteger upper) |
Construct a new immutable
RangeInclusiveB instance. |
String |
toString() |
Prints the immutable value
RangeInclusiveB with attribute values. |
BigInteger |
upper() |
|
RangeInclusiveB |
withLower(BigInteger value) |
Copy the current immutable object by setting a value for the
lower attribute. |
RangeInclusiveB |
withUpper(BigInteger value) |
Copy the current immutable object by setting a value for the
upper attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckPreconditions, includesValue, isIncludedInpublic BigInteger lower()
lower in interface RangeInclusiveBTypepublic BigInteger upper()
upper in interface RangeInclusiveBTypepublic BigInteger interval()
Retrieve the number of values in the range [lower, upper]. That
is, (upper - lower) + 1.
interval in interface RangeInclusiveBTypepublic final RangeInclusiveB withLower(BigInteger value)
lower attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for lowerthis objectpublic final RangeInclusiveB withUpper(BigInteger value)
upper attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for upperthis objectpublic boolean equals(Object another)
RangeInclusiveB that have equal attribute values.public int hashCode()
lower, upper, interval.public String toString()
RangeInclusiveB with attribute values.public static RangeInclusiveB of(BigInteger lower, BigInteger upper)
RangeInclusiveB instance.lower - The value for the lower attributeupper - The value for the upper attributepublic static RangeInclusiveB copyOf(RangeInclusiveBType instance)
RangeInclusiveBType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static RangeInclusiveB.Builder builder()
RangeInclusiveB.Copyright © 2017 <code@io7m.com> http://io7m.com