Class ImmutableFileFormat.Extension

java.lang.Object
io.substrait.relation.files.FileFormat.Extension
io.substrait.relation.files.ImmutableFileFormat.Extension
All Implemented Interfaces:
FileFormat
Enclosing class:
ImmutableFileFormat

public static final class ImmutableFileFormat.Extension extends FileFormat.Extension
Immutable implementation of FileFormat.Extension.

Use the builder to create immutable instances: ImmutableFileFormat.Extension.builder().

  • Method Details

    • getExtension

      public com.google.protobuf.Any getExtension()
      Specified by:
      getExtension in class FileFormat.Extension
      Returns:
      The value of the extension attribute
    • withExtension

      public final ImmutableFileFormat.Extension withExtension(com.google.protobuf.Any value)
      Copy the current immutable object by setting a value for the extension attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for extension
      Returns:
      A modified copy or the this object
    • equals

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

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

      public static ImmutableFileFormat.Extension copyOf(FileFormat.Extension instance)
      Creates an immutable copy of a FileFormat.Extension 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 Extension instance
    • builder

      public static ImmutableFileFormat.Extension.Builder builder()
      Creates a builder for Extension.
       ImmutableFileFormat.Extension.builder()
          .extension(com.google.protobuf.Any) // required extension
          .build();
       
      Returns:
      A new Extension builder