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.

  • Constructor Details

    • CheckerDouble

      protected CheckerDouble(Double nDouble, String name)
      Constructs a new CheckerDouble with the specified nDouble and name.
      Parameters:
      nDouble - the Double to be wrapped and checked
      name - the name identifying this checker function
  • Method Details

    • check

      public static CheckerDouble check(Double number, String name)
      Creates a new CheckerDouble for the given Double instance with a custom name.
      Parameters:
      number - the Double instance to be checked
      name - the name to identify this checker instance (useful for error messages)
      Returns:
      a new CheckerDouble for the provided Double
    • check

      public static CheckerDouble check(Number number, String name)
      Creates a new CheckerDouble for the given Number instance with a custom name.
      Parameters:
      number - the Number 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 provided Number
    • check

      public static CheckerDouble check(Double number)
      Creates a new CheckerDouble for the given Double instance with a default name.
      Parameters:
      number - the Double instance to be checked
      Returns:
      a new CheckerDouble for the provided Double
    • check

      public static CheckerDouble check(Number number)
      Creates a new CheckerDouble for the given Number instance with a default name.
      Parameters:
      number - the Number instance to be checked (converted to double)
      Returns:
      a new CheckerDouble for the provided Number
    • self

      protected CheckerDouble self()
      Returns this checker instance (for fluent API usage).
      Specified by:
      self in class AbstractChecker<Double,CheckerDouble>
      Returns:
      this CheckerDouble instance
    • isNaN

      public CheckerDouble isNaN()
      Asserts that the Double value is NaN (not a number).
      Returns:
      this CheckerDouble instance for further validation
    • isInfinite

      public CheckerDouble isInfinite()
      Asserts that the Double value is infinite.
      Returns:
      this CheckerDouble instance for further validation
    • isPositive

      public CheckerDouble isPositive()
      Asserts that the Double value is positive (greater than zero).
      Specified by:
      isPositive in interface InterfaceCheckerNumber<CheckerDouble>
      Returns:
      this CheckerDouble instance for further validation
    • isPositiveOrZero

      public CheckerDouble isPositiveOrZero()
      Asserts that the Double value is positive or zero (greater than or equal to zero).
      Specified by:
      isPositiveOrZero in interface InterfaceCheckerNumber<CheckerDouble>
      Returns:
      this CheckerDouble instance for further validation
    • isNegative

      public CheckerDouble isNegative()
      Asserts that the Double value is negative (less than zero).
      Specified by:
      isNegative in interface InterfaceCheckerNumber<CheckerDouble>
      Returns:
      this CheckerDouble instance for further validation
    • isNegativeOrZero

      public CheckerDouble isNegativeOrZero()
      Asserts that the Double value is negative or zero (less than or equal to zero).
      Specified by:
      isNegativeOrZero in interface InterfaceCheckerNumber<CheckerDouble>
      Returns:
      this CheckerDouble instance for further validation
    • isZero

      public CheckerDouble isZero()
      Asserts that the Double value is zero.
      Specified by:
      isZero in interface InterfaceCheckerNumber<CheckerDouble>
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Byte number)
      Asserts that the Double value is greater than the specified value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Short number)
      Asserts that the Double value is greater than or equal to the specified value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Integer number)
      Asserts that the Double value is less than the specified value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Long number)
      Asserts that the Double value is less than or equal to the specified value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Float number)
      Asserts that the Double value is greater than the specified Float value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Float value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterThan

      public CheckerDouble isGreaterThan(Double number)
      Asserts that the Double value is greater than the specified Double value.
      Specified by:
      isGreaterThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Double value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Byte number)
      Asserts that the Double value is greater than or equal to the specified Byte value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Byte value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Short number)
      Asserts that the Double value is greater than or equal to the specified Short value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Short value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Integer number)
      Asserts that the Double value is greater than or equal to the specified Integer value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Integer value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Long number)
      Asserts that the Double value is greater than or equal to the specified Long value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Long value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Float number)
      Asserts that the Double value is greater than or equal to the specified Float value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Float value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isGreaterOrEqualTo

      public CheckerDouble isGreaterOrEqualTo(Double number)
      Asserts that the Double value is greater than or equal to the specified Double value.
      Specified by:
      isGreaterOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Double value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Byte number)
      Asserts that the Double value is less than to the specified Byte value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Byte value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Short number)
      Asserts that the Double value is less than to the specified Short value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Short value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Integer number)
      Asserts that the Double value is less than to the specified Integer value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Integer value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Long number)
      Asserts that the Double value is less than to the specified Long value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Long value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Float number)
      Asserts that the Double value is less than the specified Float value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Float value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessThan

      public CheckerDouble isLessThan(Double number)
      Asserts that the Double value is less than the specified Double value.
      Specified by:
      isLessThan in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Double value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Byte number)
      Asserts that the Double value is less than or equal to the specified Byte value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Byte value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Short number)
      Asserts that the Double value is less than or equal to the specified Short value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Short value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Integer number)
      Asserts that the Double value is less than or equal to the specified Integer value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Integer value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Long number)
      Asserts that the Double value is less than or equal to the specified Long value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Long value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Float number)
      Asserts that the Double value is less than or equal to the specified Float value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Float value to compare against
      Returns:
      this CheckerDouble instance for further validation
    • isLessOrEqualTo

      public CheckerDouble isLessOrEqualTo(Double number)
      Asserts that the Double value is less than or equal to the specified Double value.
      Specified by:
      isLessOrEqualTo in interface InterfaceCheckerNumber<CheckerDouble>
      Parameters:
      number - the Double value to compare against
      Returns:
      this CheckerDouble instance for further validation