Package org.elasticsearch.common.unit
Class RatioValue
java.lang.Object
org.elasticsearch.common.unit.RatioValue
Utility class to represent ratio and percentage values between 0 and 100
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
static RatioValue
parseRatioValue(String sValue)
Parses the provided string as aRatioValue
, the string can either be in percentage format (eg.toString()
-
Constructor Details
-
RatioValue
public RatioValue(double percent)
-
-
Method Details
-
getAsRatio
public double getAsRatio() -
getAsPercent
public double getAsPercent() -
toString
-
parseRatioValue
Parses the provided string as aRatioValue
, the string can either be in percentage format (eg. 73.5%), or a floating-point ratio format (eg. 0.735)
-