Class Evals

java.lang.Object
org.apache.druid.math.expr.Evals

public class Evals extends Object
  • Constructor Details

    • Evals

      public Evals()
  • Method Details

    • isAllConstants

      public static boolean isAllConstants(Expr... exprs)
    • isAllConstants

      public static boolean isAllConstants(List<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)
    • asBoolean

      public static boolean asBoolean(@Nullable String x)
    • objectAsBoolean

      public static boolean objectAsBoolean(@Nullable Object val)
      Best effort try to turn a value into a boolean: Boolean will be passed directly through String will use asBoolean(String) Long will use asBoolean(long) Number will use asBoolean(double) everything else, including null will be false
    • asString

      @Nullable public static String asString(@Nullable Object o)
      Call Object.toString() on a non-null value