Class ExactTolerance

    • Constructor Detail

      • ExactTolerance

        public ExactTolerance()
    • Method Detail

      • isWithinTolerance

        public boolean isWithinTolerance​(BigDecimal value1,
                                         BigDecimal value2)
        Description copied from interface: FloatingPointTolerance
        Indicates whether the specified values are equal under the tolerance.
        Specified by:
        isWithinTolerance in interface FloatingPointTolerance
        Parameters:
        value1 - the first value to compare
        value2 - the second value to compare
        Returns:
        true if the two values lie with the error bounds, otherwise false
      • isWithinTolerance

        public boolean isWithinTolerance​(double value1,
                                         double value2)
        Description copied from interface: FloatingPointTolerance
        Indicates whether the specified values are equal under the tolerance.
        Specified by:
        isWithinTolerance in interface FloatingPointTolerance
        Parameters:
        value1 - the first value to compare
        value2 - the second value to compare
        Returns:
        true if the two values lie with the error bounds, otherwise false
      • isWithinTolerance

        public boolean isWithinTolerance​(float value1,
                                         float value2)
        Description copied from interface: FloatingPointTolerance
        Indicates whether the specified values are equal under the tolerance.
        Specified by:
        isWithinTolerance in interface FloatingPointTolerance
        Parameters:
        value1 - the first value to compare
        value2 - the second value to compare
        Returns:
        true if the two values lie with the error bounds, otherwise false