Class ImmutableSimpleExtension.ValueArgument

java.lang.Object
io.substrait.extension.SimpleExtension.ValueArgument
io.substrait.extension.ImmutableSimpleExtension.ValueArgument
All Implemented Interfaces:
SimpleExtension.Argument
Enclosing class:
ImmutableSimpleExtension

public static final class ImmutableSimpleExtension.ValueArgument extends SimpleExtension.ValueArgument
Immutable implementation of SimpleExtension.ValueArgument.

Use the builder to create immutable instances: ImmutableSimpleExtension.ValueArgument.builder().

  • Method Details

    • name

      public @Nullable String name()
      Returns:
      The value of the name attribute
    • description

      public @Nullable String description()
      Returns:
      The value of the description attribute
    • value

      public ParameterizedType value()
      Specified by:
      value in class SimpleExtension.ValueArgument
      Returns:
      The value of the value attribute
    • constant

      public @Nullable Boolean constant()
      Specified by:
      constant in class SimpleExtension.ValueArgument
      Returns:
      The value of the constant attribute
    • withName

      public final ImmutableSimpleExtension.ValueArgument withName(@Nullable String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name (can be null)
      Returns:
      A modified copy or the this object
    • withDescription

      public final ImmutableSimpleExtension.ValueArgument withDescription(@Nullable String value)
      Copy the current immutable object by setting a value for the description attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for description (can be null)
      Returns:
      A modified copy or the this object
    • withValue

      Copy the current immutable object by setting a value for the value attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for value
      Returns:
      A modified copy or the this object
    • withConstant

      public final ImmutableSimpleExtension.ValueArgument withConstant(@Nullable Boolean value)
      Copy the current immutable object by setting a value for the constant attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for constant (can be null)
      Returns:
      A modified copy or the this object
    • equals

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

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

      Creates an immutable copy of a SimpleExtension.ValueArgument 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 ValueArgument instance
    • builder

      Creates a builder for ValueArgument.
       ImmutableSimpleExtension.ValueArgument.builder()
          .name(String | null) // nullable name
          .description(String | null) // nullable description
          .value(io.substrait.function.ParameterizedType) // required value
          .constant(Boolean | null) // nullable constant
          .build();
       
      Returns:
      A new ValueArgument builder