Package org.apache.druid.math.expr
Class Evals
- java.lang.Object
-
- org.apache.druid.math.expr.Evals
-
public class Evals extends Object
-
-
Constructor Summary
Constructors Constructor Description Evals()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanasBoolean(double x)static booleanasBoolean(long x)static booleanasBoolean(String x)static doubleasDouble(boolean x)static longasLong(boolean x)static StringasString(Object o)CallObject.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
-
-
-
Method Detail
-
isAllConstants
public static boolean isAllConstants(Expr... exprs)
-
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)
-
objectAsBoolean
public static boolean objectAsBoolean(@Nullable 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
-
asString
@Nullable public static String asString(@Nullable Object o)
CallObject.toString()on a non-null value
-
-