Class CheckerDouble
java.lang.Object
util.AbstractChecker<Double,CheckerDouble>
specialized_checkers.math.numbers.decimalTypes.CheckerDouble
- All Implemented Interfaces:
InterfaceCheckerNumber<CheckerDouble>
,InterfaceChecker<AbstractChecker<Double,
CheckerDouble>, Double>
public class CheckerDouble
extends AbstractChecker<Double,CheckerDouble>
implements InterfaceCheckerNumber<CheckerDouble>
Checker for
Double
instances, providing fluent validation methods for double-precision floating-point numbers.
This class allows you to validate and assert properties of Double
objects in a fluent and readable way.
-
Field Summary
Fields inherited from class util.AbstractChecker
backObject, exceptionTracker, name, object, saveErrors, stop
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CheckerDouble
(Double nDouble, String name) Constructs a newCheckerDouble
with the specified nDouble and name. -
Method Summary
Modifier and TypeMethodDescriptionstatic CheckerDouble
Creates a newCheckerDouble
for the givenDouble
instance with a default name.static CheckerDouble
Creates a newCheckerDouble
for the givenDouble
instance with a custom name.static CheckerDouble
Creates a newCheckerDouble
for the givenNumber
instance with a default name.static CheckerDouble
Creates a newCheckerDouble
for the givenNumber
instance with a custom name.isGreaterOrEqualTo
(Byte number) Asserts that theDouble
value is greater than or equal to the specifiedByte
value.isGreaterOrEqualTo
(Double number) Asserts that theDouble
value is greater than or equal to the specifiedDouble
value.isGreaterOrEqualTo
(Float number) Asserts that theDouble
value is greater than or equal to the specifiedFloat
value.isGreaterOrEqualTo
(Integer number) Asserts that theDouble
value is greater than or equal to the specifiedInteger
value.isGreaterOrEqualTo
(Long number) Asserts that theDouble
value is greater than or equal to the specifiedLong
value.isGreaterOrEqualTo
(Short number) Asserts that theDouble
value is greater than or equal to the specifiedShort
value.isGreaterThan
(Byte number) Asserts that theDouble
value is greater than the specified value.isGreaterThan
(Double number) Asserts that theDouble
value is greater than the specifiedDouble
value.isGreaterThan
(Float number) Asserts that theDouble
value is greater than the specifiedFloat
value.isGreaterThan
(Integer number) Asserts that theDouble
value is less than the specified value.isGreaterThan
(Long number) Asserts that theDouble
value is less than or equal to the specified value.isGreaterThan
(Short number) Asserts that theDouble
value is greater than or equal to the specified value.Asserts that theDouble
value is infinite.isLessOrEqualTo
(Byte number) Asserts that theDouble
value is less than or equal to the specifiedByte
value.isLessOrEqualTo
(Double number) Asserts that theDouble
value is less than or equal to the specifiedDouble
value.isLessOrEqualTo
(Float number) Asserts that theDouble
value is less than or equal to the specifiedFloat
value.isLessOrEqualTo
(Integer number) Asserts that theDouble
value is less than or equal to the specifiedInteger
value.isLessOrEqualTo
(Long number) Asserts that theDouble
value is less than or equal to the specifiedLong
value.isLessOrEqualTo
(Short number) Asserts that theDouble
value is less than or equal to the specifiedShort
value.isLessThan
(Byte number) Asserts that theDouble
value is less than to the specifiedByte
value.isLessThan
(Double number) Asserts that theDouble
value is less than the specifiedDouble
value.isLessThan
(Float number) Asserts that theDouble
value is less than the specifiedFloat
value.isLessThan
(Integer number) Asserts that theDouble
value is less than to the specifiedInteger
value.isLessThan
(Long number) Asserts that theDouble
value is less than to the specifiedLong
value.isLessThan
(Short number) Asserts that theDouble
value is less than to the specifiedShort
value.isNaN()
Asserts that theDouble
value is NaN (not a number).Asserts that theDouble
value is negative (less than zero).Asserts that theDouble
value is negative or zero (less than or equal to zero).Asserts that theDouble
value is positive (greater than zero).Asserts that theDouble
value is positive or zero (greater than or equal to zero).isZero()
Asserts that theDouble
value is zero.protected CheckerDouble
self()
Returns this checker instance (for fluent API usage).Methods inherited from class util.AbstractChecker
checkProperty, checkProperty, checkProperty, end, getMethod, getObject, getProperty, hasErrors, hasNotErrors, is, is, isEqual, isNonNull, isNot, isNot, isNull, notSaveErrors, saveErrors, show, showNotThrownException, showThrownException, stop
-
Constructor Details
-
CheckerDouble
-
-
Method Details
-
check
Creates a newCheckerDouble
for the givenDouble
instance with a custom name.- Parameters:
number
- theDouble
instance to be checkedname
- the name to identify this checker instance (useful for error messages)- Returns:
- a new
CheckerDouble
for the providedDouble
-
check
Creates a newCheckerDouble
for the givenNumber
instance with a custom name.- Parameters:
number
- theNumber
instance to be checked (converted to double)name
- the name to identify this checker instance (useful for error messages)- Returns:
- a new
CheckerDouble
for the providedNumber
-
check
Creates a newCheckerDouble
for the givenDouble
instance with a default name.- Parameters:
number
- theDouble
instance to be checked- Returns:
- a new
CheckerDouble
for the providedDouble
-
check
Creates a newCheckerDouble
for the givenNumber
instance with a default name.- Parameters:
number
- theNumber
instance to be checked (converted to double)- Returns:
- a new
CheckerDouble
for the providedNumber
-
self
Returns this checker instance (for fluent API usage).- Specified by:
self
in classAbstractChecker<Double,
CheckerDouble> - Returns:
- this
CheckerDouble
instance
-
isNaN
Asserts that theDouble
value is NaN (not a number).- Returns:
- this
CheckerDouble
instance for further validation
-
isInfinite
Asserts that theDouble
value is infinite.- Returns:
- this
CheckerDouble
instance for further validation
-
isPositive
Asserts that theDouble
value is positive (greater than zero).- Specified by:
isPositive
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Returns:
- this
CheckerDouble
instance for further validation
-
isPositiveOrZero
Asserts that theDouble
value is positive or zero (greater than or equal to zero).- Specified by:
isPositiveOrZero
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Returns:
- this
CheckerDouble
instance for further validation
-
isNegative
Asserts that theDouble
value is negative (less than zero).- Specified by:
isNegative
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Returns:
- this
CheckerDouble
instance for further validation
-
isNegativeOrZero
Asserts that theDouble
value is negative or zero (less than or equal to zero).- Specified by:
isNegativeOrZero
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Returns:
- this
CheckerDouble
instance for further validation
-
isZero
Asserts that theDouble
value is zero.- Specified by:
isZero
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is greater than the specified value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- the value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is greater than or equal to the specified value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- the value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is less than the specified value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- the value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is less than or equal to the specified value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- the value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is greater than the specifiedFloat
value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theFloat
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterThan
Asserts that theDouble
value is greater than the specifiedDouble
value.- Specified by:
isGreaterThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theDouble
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedByte
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theByte
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedShort
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theShort
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedInteger
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theInteger
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedLong
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theLong
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedFloat
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theFloat
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isGreaterOrEqualTo
Asserts that theDouble
value is greater than or equal to the specifiedDouble
value.- Specified by:
isGreaterOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theDouble
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than to the specifiedByte
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theByte
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than to the specifiedShort
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theShort
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than to the specifiedInteger
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theInteger
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than to the specifiedLong
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theLong
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than the specifiedFloat
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theFloat
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessThan
Asserts that theDouble
value is less than the specifiedDouble
value.- Specified by:
isLessThan
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theDouble
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedByte
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theByte
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedShort
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theShort
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedInteger
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theInteger
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedLong
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theLong
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedFloat
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theFloat
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-
isLessOrEqualTo
Asserts that theDouble
value is less than or equal to the specifiedDouble
value.- Specified by:
isLessOrEqualTo
in interfaceInterfaceCheckerNumber<CheckerDouble>
- Parameters:
number
- theDouble
value to compare against- Returns:
- this
CheckerDouble
instance for further validation
-