Class ImmutableSimpleExtension.TypeArgument

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

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

Use the builder to create immutable instances: ImmutableSimpleExtension.TypeArgument.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
    • type

      public ParameterizedType type()
      Specified by:
      type in class SimpleExtension.TypeArgument
      Returns:
      The value of the type attribute
    • withName

      public final ImmutableSimpleExtension.TypeArgument 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.TypeArgument 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
    • withType

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

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

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

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

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