com.groupbyinc.flux.common.unit.RatioValue.class Maven / Gradle / Ivy
???? 4 e *com/groupbyinc/flux/common/unit/RatioValue java/lang/Object RatioValue.java percent D (D)V ()V
this ,Lcom/groupbyinc/flux/common/unit/RatioValue;
getAsRatio ()D@Y getAsPercent toString ()Ljava/lang/String; java/lang/StringBuilder
append (D)Ljava/lang/StringBuilder;
% -(Ljava/lang/String;)Ljava/lang/StringBuilder; !
"
$ parseRatioValue @(Ljava/lang/String;)Lcom/groupbyinc/flux/common/unit/RatioValue; java/lang/NumberFormatException ( java/lang/String * endsWith (Ljava/lang/String;)Z , -
+ . length ()I 0 1
+ 2 substring (II)Ljava/lang/String; 4 5
+ 6 java/lang/Double 8 parseDouble (Ljava/lang/String;)D : ;
9 < /com/groupbyinc/flux/ElasticsearchParseException > )Percentage should be in [0-100], got [{}] @ ((Ljava/lang/String;[Ljava/lang/Object;)V B
? C java/lang/Math E abs (D)D G H
F I
K Failed to parse [{}] as a double M =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V O
? P $Ratio should be in [0-1.0], got [{}] R valueOf (D)Ljava/lang/Double; T U
9 V Invalid ratio or percentage [{}] X e !Ljava/lang/NumberFormatException; percentAsString Ljava/lang/String; ratio sValue Code LocalVariableTable LineNumberTable
StackMapTable
SourceFile ! ` F
*? *'? ? a
b ` 3 *? o? a b # ` / *? ? a b ' ` A ? Y? *? ? ? #? %? a b , &