Class ImmutableExtensionMulti

All Implemented Interfaces:
Rel

public final class ImmutableExtensionMulti extends ExtensionMulti
Immutable implementation of ExtensionMulti.

Use the builder to create immutable instances: ImmutableExtensionMulti.builder().

  • Method Details

    • getRemap

      public Optional<Rel.Remap> getRemap()
      Returns:
      The value of the remap attribute
    • getCommonExtension

      public Optional<AdvancedExtension> getCommonExtension()
      Returns:
      the AdvancedExtension associated with a RelCommon message, if present
    • getInputs

      public List<Rel> getInputs()
      Returns:
      The value of the inputs attribute
    • getHint

      public Optional<Hint> getHint()
      Returns:
      The value of the hint attribute
    • deriveRecordType

      protected Type.Struct deriveRecordType()
      Specified by:
      deriveRecordType in class AbstractRel
      Returns:
      The value of the deriveRecordType attribute
    • getDetail

      public Extension.MultiRelDetail getDetail()
      Specified by:
      getDetail in class ExtensionMulti
      Returns:
      The value of the detail attribute
    • withRemap

      public final ImmutableExtensionMulti withRemap(Rel.Remap value)
      Copy the current immutable object by setting a present value for the optional remap attribute.
      Parameters:
      value - The value for remap
      Returns:
      A modified copy or this if not changed
    • withRemap

      public final ImmutableExtensionMulti withRemap(Optional<? extends Rel.Remap> optional)
      Copy the current immutable object by setting an optional value for the remap attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for remap
      Returns:
      A modified copy or this if not changed
    • withCommonExtension

      public final ImmutableExtensionMulti withCommonExtension(AdvancedExtension value)
      Copy the current immutable object by setting a present value for the optional commonExtension attribute.
      Parameters:
      value - The value for commonExtension
      Returns:
      A modified copy or this if not changed
    • withCommonExtension

      public final ImmutableExtensionMulti withCommonExtension(Optional<? extends AdvancedExtension> optional)
      Copy the current immutable object by setting an optional value for the commonExtension attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for commonExtension
      Returns:
      A modified copy or this if not changed
    • withInputs

      public final ImmutableExtensionMulti withInputs(Rel... elements)
      Copy the current immutable object with elements that replace the content of inputs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withInputs

      public final ImmutableExtensionMulti withInputs(Iterable<? extends Rel> elements)
      Copy the current immutable object with elements that replace the content of inputs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of inputs elements to set
      Returns:
      A modified copy or this if not changed
    • withHint

      public final ImmutableExtensionMulti withHint(Hint value)
      Copy the current immutable object by setting a present value for the optional hint attribute.
      Parameters:
      value - The value for hint
      Returns:
      A modified copy or this if not changed
    • withHint

      public final ImmutableExtensionMulti withHint(Optional<? extends Hint> optional)
      Copy the current immutable object by setting an optional value for the hint attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for hint
      Returns:
      A modified copy or this if not changed
    • withDeriveRecordType

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

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

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableExtensionMulti 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: remap, commonExtension, inputs, hint, deriveRecordType, detail.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableExtensionMulti copyOf(ExtensionMulti instance)
      Creates an immutable copy of a ExtensionMulti 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 ExtensionMulti instance
    • builder

      public static ImmutableExtensionMulti.Builder builder()
      Creates a builder for ImmutableExtensionMulti.
       ImmutableExtensionMulti.builder()
          .remap(Optional<io.substrait.relation.Rel.Remap>) // optional remap
          .commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optional commonExtension
          .addInputs|addAllInputs(io.substrait.relation.Rel) // inputs elements
          .hint(Optional<io.substrait.hint.Hint>) // optional hint
          .deriveRecordType(io.substrait.type.Type.Struct) // required deriveRecordType
          .detail(io.substrait.relation.Extension.MultiRelDetail) // required detail
          .build();
       
      Returns:
      A new ImmutableExtensionMulti builder