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