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