Class ImmutableExpression.Lambda

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

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

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

  • Method Details

    • parameters

      public Type.Struct parameters()
      Specified by:
      parameters in class Expression.Lambda
      Returns:
      The value of the parameters attribute
    • body

      public Expression body()
      Specified by:
      body in class Expression.Lambda
      Returns:
      The value of the body attribute
    • withParameters

      public final ImmutableExpression.Lambda withParameters(Type.Struct value)
      Copy the current immutable object by setting a value for the parameters attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parameters
      Returns:
      A modified copy or the this object
    • withBody

      public final ImmutableExpression.Lambda withBody(Expression value)
      Copy the current immutable object by setting a value for the body attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for body
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of Lambda 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: parameters, body.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableExpression.Lambda copyOf(Expression.Lambda instance)
      Creates an immutable copy of a Expression.Lambda 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 Lambda instance
    • builder

      public static ImmutableExpression.Lambda.Builder builder()
      Creates a builder for Lambda.
       ImmutableExpression.Lambda.builder()
          .parameters(io.substrait.type.Type.Struct) // required parameters
          .body(io.substrait.expression.Expression) // required body
          .build();
       
      Returns:
      A new Lambda builder