Package org.apache.druid.math.expr
Class Evals
java.lang.Object
org.apache.druid.math.expr.Evals
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanasBoolean(double x) static booleanasBoolean(long x) static booleanstatic doubleasDouble(boolean x) static longasLong(boolean x) static StringCallObject.toString()on a non-null valuestatic booleanisAllConstants(List<Expr> exprs) static booleanisAllConstants(Expr... exprs) static booleanobjectAsBoolean(Object val) Best effort try to turn a value into a boolean:Booleanwill be passed directly throughStringwill useasBoolean(String)Longwill useasBoolean(long)Numberwill useasBoolean(double)everything else, including null will be false
-
Constructor Details
-
Evals
public Evals()
-
-
Method Details
-
isAllConstants
-
isAllConstants
-
asLong
public static long asLong(boolean x) -
asDouble
public static double asDouble(boolean x) -
asBoolean
public static boolean asBoolean(long x) -
asBoolean
public static boolean asBoolean(double x) -
asBoolean
-
objectAsBoolean
Best effort try to turn a value into a boolean:Booleanwill be passed directly throughStringwill useasBoolean(String)Longwill useasBoolean(long)Numberwill useasBoolean(double)everything else, including null will be false -
asString
CallObject.toString()on a non-null value
-