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 NumberConstraint
max
- max valuepublic boolean isMin(long min)
isMin
in interface NumberConstraint
min
- min valuepublic boolean isDigits(int integer, int fraction)
isDigits
in interface NumberConstraint
integer
- value of integer partfraction
- value of fraction partpublic boolean isDecimalMax(java.math.BigDecimal max, boolean inclusive)
isDecimalMax
in interface NumberConstraint
max
- max valueinclusive
- inclusive option, true by defaultpublic boolean isDecimalMin(java.math.BigDecimal min, boolean inclusive)
isDecimalMin
in interface NumberConstraint
min
- min valueinclusive
- inclusive option, true by defaultpublic boolean isNegativeOrZero()
isNegativeOrZero
in interface NumberConstraint
public boolean isNegative()
isNegative
in interface NumberConstraint
public boolean isPositiveOrZero()
isPositiveOrZero
in interface NumberConstraint
public boolean isPositive()
isPositive
in interface NumberConstraint
public boolean isDoubleMax(java.lang.Double max, boolean inclusive)
isDoubleMax
in interface NumberConstraint
max
- max valueinclusive
- inclusive option, true by defaultpublic boolean isDoubleMin(java.lang.Double min, boolean inclusive)
isDoubleMin
in interface NumberConstraint
min
- min valueinclusive
- inclusive option, true by default