public class BigDecimalConstraint extends java.lang.Object implements NumberConstraint
| Modifier and Type | Field and Description |
|---|---|
protected java.math.BigDecimal |
value |
| Constructor and Description |
|---|
BigDecimalConstraint(java.math.BigDecimal value) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareValueWith(long val) |
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 defaultprotected int compareValueWith(long val)