Class ImmutableExpression.IntervalDayLiteral

java.lang.Object
io.substrait.expression.Expression.IntervalDayLiteral
io.substrait.expression.ImmutableExpression.IntervalDayLiteral
All Implemented Interfaces:
Expression, Expression.Literal, FunctionArg
Enclosing class:
ImmutableExpression

public static final class ImmutableExpression.IntervalDayLiteral extends Expression.IntervalDayLiteral
Immutable implementation of Expression.IntervalDayLiteral.

Use the builder to create immutable instances: ImmutableExpression.IntervalDayLiteral.builder().

  • Method Details

    • nullable

      public boolean nullable()
      Returns:
      The value of the nullable attribute
    • days

      public int days()
      Specified by:
      days in class Expression.IntervalDayLiteral
      Returns:
      The value of the days attribute
    • seconds

      public int seconds()
      Specified by:
      seconds in class Expression.IntervalDayLiteral
      Returns:
      The value of the seconds attribute
    • subseconds

      public long subseconds()
      Specified by:
      subseconds in class Expression.IntervalDayLiteral
      Returns:
      The value of the subseconds attribute
    • precision

      public int precision()
      Specified by:
      precision in class Expression.IntervalDayLiteral
      Returns:
      The value of the precision attribute
    • withNullable

      public final ImmutableExpression.IntervalDayLiteral withNullable(boolean value)
      Copy the current immutable object by setting a value for the nullable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nullable
      Returns:
      A modified copy or the this object
    • withDays

      public final ImmutableExpression.IntervalDayLiteral withDays(int value)
      Copy the current immutable object by setting a value for the days attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for days
      Returns:
      A modified copy or the this object
    • withSeconds

      public final ImmutableExpression.IntervalDayLiteral withSeconds(int value)
      Copy the current immutable object by setting a value for the seconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for seconds
      Returns:
      A modified copy or the this object
    • withSubseconds

      public final ImmutableExpression.IntervalDayLiteral withSubseconds(long value)
      Copy the current immutable object by setting a value for the subseconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for subseconds
      Returns:
      A modified copy or the this object
    • withPrecision

      public final ImmutableExpression.IntervalDayLiteral withPrecision(int value)
      Copy the current immutable object by setting a value for the precision attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for precision
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of IntervalDayLiteral that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: nullable, days, seconds, subseconds, precision.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value IntervalDayLiteral with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a Expression.IntervalDayLiteral value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable IntervalDayLiteral instance
    • builder

      Creates a builder for IntervalDayLiteral.
       ImmutableExpression.IntervalDayLiteral.builder()
          .nullable(boolean) // optional nullable
          .days(int) // required days
          .seconds(int) // required seconds
          .subseconds(long) // required subseconds
          .precision(int) // required precision
          .build();
       
      Returns:
      A new IntervalDayLiteral builder