Class Literal


public final class Literal extends AstExpression
A literal value in an AST expression.
  • Method Details

    • ofNull

      public static Literal ofNull(DType type)
      Construct a null literal of the specified type.
    • ofBoolean

      public static Literal ofBoolean(boolean value)
      Construct a boolean literal with the specified value.
    • ofBoolean

      public static Literal ofBoolean(Boolean value)
      Construct a boolean literal with the specified value or null.
    • ofByte

      public static Literal ofByte(byte value)
      Construct a byte literal with the specified value.
    • ofByte

      public static Literal ofByte(Byte value)
      Construct a byte literal with the specified value or null.
    • ofShort

      public static Literal ofShort(short value)
      Construct a short literal with the specified value.
    • ofShort

      public static Literal ofShort(Short value)
      Construct a short literal with the specified value or null.
    • ofInt

      public static Literal ofInt(int value)
      Construct an integer literal with the specified value.
    • ofInt

      public static Literal ofInt(Integer value)
      Construct an integer literal with the specified value or null.
    • ofLong

      public static Literal ofLong(long value)
      Construct a long literal with the specified value.
    • ofLong

      public static Literal ofLong(Long value)
      Construct a long literal with the specified value or null.
    • ofFloat

      public static Literal ofFloat(float value)
      Construct a float literal with the specified value.
    • ofFloat

      public static Literal ofFloat(Float value)
      Construct a float literal with the specified value or null.
    • ofDouble

      public static Literal ofDouble(double value)
      Construct a double literal with the specified value.
    • ofDouble

      public static Literal ofDouble(Double value)
      Construct a double literal with the specified value or null.
    • ofTimestampDaysFromInt

      public static Literal ofTimestampDaysFromInt(int value)
      Construct a timestamp days literal with the specified value.
    • ofTimestampDaysFromInt

      public static Literal ofTimestampDaysFromInt(Integer value)
      Construct a timestamp days literal with the specified value or null.
    • ofTimestampFromLong

      public static Literal ofTimestampFromLong(DType type, long value)
      Construct a long-based timestamp literal with the specified value.
    • ofTimestampFromLong

      public static Literal ofTimestampFromLong(DType type, Long value)
      Construct a long-based timestamp literal with the specified value or null.
    • ofDurationDaysFromInt

      public static Literal ofDurationDaysFromInt(int value)
      Construct a duration days literal with the specified value.
    • ofDurationDaysFromInt

      public static Literal ofDurationDaysFromInt(Integer value)
      Construct a duration days literal with the specified value or null.
    • ofDurationFromLong

      public static Literal ofDurationFromLong(DType type, long value)
      Construct a long-based duration literal with the specified value.
    • ofDurationFromLong

      public static Literal ofDurationFromLong(DType type, Long value)
      Construct a long-based duration literal with the specified value or null.
    • ofString

      public static Literal ofString(String value)
      Construct a string literal with the specified value or null.
    • ofUTF8String

      public static Literal ofUTF8String(byte[] stringBytes)
      Construct a string literal directly with byte array to skip transcoding.