Class DescriptiveRatioGauge.Ratio

  • Enclosing class:
    DescriptiveRatioGauge

    public static class DescriptiveRatioGauge.Ratio
    extends java.lang.Object
    A ratio of one quantity to another.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getValue()
      Returns the ratio, which is either a double between 0 and 1 (inclusive) or NaN.
      static DescriptiveRatioGauge.Ratio of​(double numerator, double denominator)
      Creates a new ratio with the given numerator and denominator.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • numerator

        public final double numerator
      • denominator

        public final double denominator
    • Method Detail

      • of

        public static DescriptiveRatioGauge.Ratio of​(double numerator,
                                                     double denominator)
        Creates a new ratio with the given numerator and denominator.
        Parameters:
        numerator - the numerator of the ratio
        denominator - the denominator of the ratio
        Returns:
        numerator:denominator
      • getValue

        public double getValue()
        Returns the ratio, which is either a double between 0 and 1 (inclusive) or NaN.
        Returns:
        the ratio
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object