Class RatioValue

org.elasticsearch.common.unit.RatioValue

public class RatioValue extends
Utility class to represent ratio and percentage values between 0 and 100
  • Constructor Summary

    Constructors
    Constructor
    Description
    RatioValue​(double percent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
    static RatioValue
     sValue)
    Parses the provided string as a RatioValue, the string can either be in percentage format (eg.
     

    Methods inherited from class java.lang.

    , , , , , , , , ,
  • Constructor Details

    • RatioValue

      public RatioValue(double percent)
  • Method Details

    • getAsRatio

      public double getAsRatio()
    • getAsPercent

      public double getAsPercent()
    • toString

      public  toString()
      Overrides:
       in class 
    • parseRatioValue

      public static  sValue)
      Parses the provided string as a RatioValue, the string can either be in percentage format (eg. 73.5%), or a floating-point ratio format (eg. 0.735)