@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableRangeConstraint extends Object implements RangeConstraint
RangeConstraint.
Use the builder to create immutable instances:
ImmutableRangeConstraint.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableRangeConstraint.Builder
Builds instances of type
ImmutableRangeConstraint. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableRangeConstraint.Builder |
builder()
Creates a builder for
ImmutableRangeConstraint. |
static ImmutableRangeConstraint |
copyOf(RangeConstraint instance)
Creates an immutable copy of a
RangeConstraint value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableRangeConstraint that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
minRange, maxRange. |
BigDecimal |
maxRange()
Maximum value of the range.
|
BigDecimal |
minRange()
Minimum value of the range.
|
String |
toString()
Prints the immutable value
RangeConstraint with attribute values. |
ImmutableRangeConstraint |
withMaxRange(BigDecimal value)
Copy the current immutable object by setting a value for the
maxRange attribute. |
ImmutableRangeConstraint |
withMinRange(BigDecimal value)
Copy the current immutable object by setting a value for the
minRange attribute. |
public BigDecimal minRange()
minRange in interface RangeConstraintpublic BigDecimal maxRange()
maxRange in interface RangeConstraintpublic final ImmutableRangeConstraint withMinRange(BigDecimal value)
minRange attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for minRangethis objectpublic final ImmutableRangeConstraint withMaxRange(BigDecimal value)
maxRange attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for maxRangethis objectpublic boolean equals(@Nullable Object another)
ImmutableRangeConstraint that have equal attribute values.public int hashCode()
minRange, maxRange.public String toString()
RangeConstraint with attribute values.public static ImmutableRangeConstraint copyOf(RangeConstraint instance)
RangeConstraint 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 ImmutableRangeConstraint.Builder builder()
ImmutableRangeConstraint.
ImmutableRangeConstraint.builder()
.minRange(java.math.BigDecimal) // required minRange
.maxRange(java.math.BigDecimal) // required maxRange
.build();
Copyright © 2021–2022 Amazon Web Services. All rights reserved.