Interface NumberConstraint
- All Known Implementing Classes:
- BigDecimalConstraint,- BigIntegerConstraint,- DoubleConstraint,- FloatConstraint,- LongConstraint
public interface NumberConstraint
Base interface for number type validators which contains all numeric restrictions.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisDecimalMax(BigDecimal max, boolean inclusive) booleanisDecimalMin(BigDecimal min, boolean inclusive) booleanisDigits(int integer, int fraction) booleanisDoubleMax(Double max, boolean inclusive) booleanisDoubleMin(Double min, boolean inclusive) booleanisMax(long max) booleanisMin(long min) booleanbooleanbooleanboolean
- 
Method Details- 
isMaxboolean isMax(long max) - Parameters:
- max- max value
- Returns:
- true if value less than or equal to max
 
- 
isMinboolean isMin(long min) - Parameters:
- min- min value
- Returns:
- true if value greater than or equal to min
 
- 
isDigitsboolean isDigits(int integer, int fraction) - Parameters:
- integer- value of integer part
- fraction- value of fraction part
- Returns:
- true if value within accepted range
 
- 
isDecimalMax- Parameters:
- max- max value
- inclusive- inclusive option, true by default
- Returns:
- true if value less than or equal to max (depends on inclusive option)
 
- 
isDecimalMin- Parameters:
- min- min value
- inclusive- inclusive option, true by default
- Returns:
- true if value less than or equal to min (depends on inclusive option)
 
- 
isNegativeOrZeroboolean isNegativeOrZero()- Returns:
- true if value is less than or equal to 0
 
- 
isNegativeboolean isNegative()- Returns:
- true if value is strictly less than 0
 
- 
isPositiveOrZeroboolean isPositiveOrZero()- Returns:
- true if value is greater than or equal to 0
 
- 
isPositiveboolean isPositive()- Returns:
- true if value is strictly greater than 0
 
- 
isDoubleMax- Parameters:
- max- max value
- inclusive- inclusive option, true by default
- Returns:
- true if value less than or equal to max (depends on inclusive option)
 
- 
isDoubleMin- Parameters:
- min- min value
- inclusive- inclusive option, true by default
- Returns:
- true if value less than or equal to min (depends on inclusive option)
 
 
-