UnsignedRangeInclusiveLTypepublic final class UnsignedRangeInclusiveL extends Object implements UnsignedRangeInclusiveLType
long components.| Modifier and Type | Class | Description |
|---|---|---|
static class |
UnsignedRangeInclusiveL.Builder |
Builds instances of type
UnsignedRangeInclusiveL. |
| Modifier and Type | Method | Description |
|---|---|---|
static UnsignedRangeInclusiveL.Builder |
builder() |
Creates a builder for
UnsignedRangeInclusiveL. |
static UnsignedRangeInclusiveL |
copyOf(UnsignedRangeInclusiveLType instance) |
Creates an immutable copy of a
UnsignedRangeInclusiveLType value. |
boolean |
equals(Object another) |
This instance is equal to all instances of
UnsignedRangeInclusiveL 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 UnsignedRangeInclusiveL |
of(long lower,
long upper) |
Construct a new immutable
UnsignedRangeInclusiveL instance. |
String |
toString() |
Prints the immutable value
UnsignedRangeInclusiveL with attribute values. |
long |
upper() |
|
UnsignedRangeInclusiveL |
withLower(long value) |
Copy the current immutable object by setting a value for the
lower attribute. |
UnsignedRangeInclusiveL |
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 UnsignedRangeInclusiveLTypepublic long upper()
upper in interface UnsignedRangeInclusiveLTypepublic long interval()
Retrieve the number of values in the range [lower, upper]. That
is, (upper - lower) + 1.
interval in interface UnsignedRangeInclusiveLTypepublic final UnsignedRangeInclusiveL 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 UnsignedRangeInclusiveL 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)
UnsignedRangeInclusiveL that have equal attribute values.public int hashCode()
lower, upper, interval.public String toString()
UnsignedRangeInclusiveL with attribute values.public static UnsignedRangeInclusiveL of(long lower, long upper)
UnsignedRangeInclusiveL instance.lower - The value for the lower attributeupper - The value for the upper attributepublic static UnsignedRangeInclusiveL copyOf(UnsignedRangeInclusiveLType instance)
UnsignedRangeInclusiveLType 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 UnsignedRangeInclusiveL.Builder builder()
UnsignedRangeInclusiveL.Copyright © 2017 <code@io7m.com> http://io7m.com