public class DoubleConstraint extends java.lang.Object implements NumberConstraint
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Double |
value |
| Constructor and Description |
|---|
DoubleConstraint(java.lang.Double value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDecimalMax(java.math.BigDecimal max,
boolean inclusive) |
boolean |
isDecimalMin(java.math.BigDecimal min,
boolean inclusive) |
boolean |
isDigits(int integer,
int fraction) |
boolean |
isDoubleMax(java.lang.Double max,
boolean inclusive) |
boolean |
isDoubleMin(java.lang.Double min,
boolean inclusive) |
boolean |
isMax(long max) |
boolean |
isMin(long min) |
boolean |
isNegative() |
boolean |
isNegativeOrZero() |
boolean |
isPositive() |
boolean |
isPositiveOrZero() |
public boolean isMax(long max)
isMax in interface NumberConstraintmax - max valuepublic boolean isMin(long min)
isMin in interface NumberConstraintmin - min valuepublic boolean isDigits(int integer,
int fraction)
isDigits in interface NumberConstraintinteger - value of integer partfraction - value of fraction partpublic boolean isDecimalMax(java.math.BigDecimal max,
boolean inclusive)
isDecimalMax in interface NumberConstraintmax - max valueinclusive - inclusive option, true by defaultpublic boolean isDecimalMin(java.math.BigDecimal min,
boolean inclusive)
isDecimalMin in interface NumberConstraintmin - min valueinclusive - inclusive option, true by defaultpublic boolean isNegativeOrZero()
isNegativeOrZero in interface NumberConstraintpublic boolean isNegative()
isNegative in interface NumberConstraintpublic boolean isPositiveOrZero()
isPositiveOrZero in interface NumberConstraintpublic boolean isPositive()
isPositive in interface NumberConstraintpublic boolean isDoubleMax(java.lang.Double max,
boolean inclusive)
isDoubleMax in interface NumberConstraintmax - max valueinclusive - inclusive option, true by defaultpublic boolean isDoubleMin(java.lang.Double min,
boolean inclusive)
isDoubleMin in interface NumberConstraintmin - min valueinclusive - inclusive option, true by default