Class CloseTo

  • All Implemented Interfaces:
    Quality<java.lang.Number>

    public final class CloseTo
    extends QualityComposition<java.lang.Number>
    • Constructor Summary

      Constructors 
      Constructor Description
      CloseTo​(double expectation)
      A Quality of a Number in that's within the given ε of one ulp as determined by Math.ulp(double)., i.e. any number x with expectation - ulp(expectation) < x < expectation + ulp(expectation)
      CloseTo​(double expectation, int ulpCount)
      A Quality of a Number in that's within the given ε of ulpCount ulp as determined by Math.ulp(double)., i.e. any number x with expectation - ulpCount * ulp(expectation) < x < expectation + ulpCount * ulp(expectation)
      CloseTo​(float expectation)
      A Quality of a Number in that's within the given ε of one ulp as determined by Math.ulp(float)., i.e. any number x with expectation - ulp(expectation) < x < expectation + ulp(expectation)
      CloseTo​(float expectation, int ulpCount)
      A Quality of a Number in that's within the given ε of ulpCount ulp as determined by Math.ulp(float)., i.e. any number x with expectation - ulpCount * ulp(expectation) < x < expectation + ulpCount * ulp(expectation)
      CloseTo​(java.lang.Number expectation, java.lang.Number ε)
      A Quality of a Number in that's within the given ε of the given Number, i.e. any number x with expectation - ε < x < expectation + ε
      CloseTo​(java.math.BigDecimal expectation, java.math.BigDecimal ε)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CloseTo

        public CloseTo​(double expectation)
        A Quality of a Number in that's within the given ε of one ulp as determined by Math.ulp(double)., i.e. any number x with expectation - ulp(expectation) < x < expectation + ulp(expectation)
      • CloseTo

        public CloseTo​(double expectation,
                       int ulpCount)
        A Quality of a Number in that's within the given ε of ulpCount ulp as determined by Math.ulp(double)., i.e. any number x with expectation - ulpCount * ulp(expectation) < x < expectation + ulpCount * ulp(expectation)
      • CloseTo

        public CloseTo​(float expectation)
        A Quality of a Number in that's within the given ε of one ulp as determined by Math.ulp(float)., i.e. any number x with expectation - ulp(expectation) < x < expectation + ulp(expectation)
      • CloseTo

        public CloseTo​(float expectation,
                       int ulpCount)
        A Quality of a Number in that's within the given ε of ulpCount ulp as determined by Math.ulp(float)., i.e. any number x with expectation - ulpCount * ulp(expectation) < x < expectation + ulpCount * ulp(expectation)
      • CloseTo

        public CloseTo​(java.lang.Number expectation,
                       java.lang.Number ε)
        A Quality of a Number in that's within the given ε of the given Number, i.e. any number x with expectation - ε < x < expectation + ε
      • CloseTo

        public CloseTo​(java.math.BigDecimal expectation,
                       java.math.BigDecimal ε)