T - the number type this range describespublic class ValueRangeImpl<T> extends Object implements ValueRange<T>
ValueRange.| Constructor and Description |
|---|
ValueRangeImpl(T min,
T max,
@Nullable BigDecimal minAsBigDecimal,
@Nullable BigDecimal maxAsBigDecimal,
boolean supportsDecimals,
boolean hasInfinityAndNaN)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getMaxInOwnType() |
@Nullable BigDecimal |
getMaxValue() |
T |
getMinInOwnType() |
@Nullable BigDecimal |
getMinValue() |
boolean |
hasInfinityAndNaN()
Returns whether the type has values for
NaN and infinity, such as Double
with Double.POSITIVE_INFINITY. |
boolean |
supportsDecimals() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEqualOrSupersetOf, supportsAllValuesOfpublic ValueRangeImpl(@Nullable
T min,
@Nullable
T max,
@Nullable
@Nullable BigDecimal minAsBigDecimal,
@Nullable
@Nullable BigDecimal maxAsBigDecimal,
boolean supportsDecimals,
boolean hasInfinityAndNaN)
min - the minimum value the type can represent, in its own typemax - the maximum value the type can represent, in its own typeminAsBigDecimal - the minimum value the type can represent, as BigDecimalmaxAsBigDecimal - the maximum value the type can represent, as BigDecimalsupportsDecimals - whether this type can have decimalshasInfinityAndNaN - whether this type has values for NaN and infinity@Nullable public @Nullable BigDecimal getMinValue()
getMinValue in interface ValueRange<T>@Nullable public @Nullable BigDecimal getMaxValue()
getMaxValue in interface ValueRange<T>@Nullable public T getMinInOwnType()
getMinInOwnType in interface ValueRange<T>@Nullable public T getMaxInOwnType()
getMaxInOwnType in interface ValueRange<T>public boolean supportsDecimals()
supportsDecimals in interface ValueRange<T>public boolean hasInfinityAndNaN()
ValueRangeNaN and infinity, such as Double
with Double.POSITIVE_INFINITY.hasInfinityAndNaN in interface ValueRange<T>Copyright © 2023. All rights reserved.