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