Class ImmutableSimpleExtension.TypeAnchor

java.lang.Object
io.substrait.extension.ImmutableSimpleExtension.TypeAnchor
All Implemented Interfaces:
SimpleExtension.Anchor, SimpleExtension.TypeAnchor
Enclosing class:
ImmutableSimpleExtension

public static final class ImmutableSimpleExtension.TypeAnchor extends Object implements SimpleExtension.TypeAnchor
Immutable implementation of SimpleExtension.TypeAnchor.

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

  • Method Details

    • urn

      public String urn()
      Specified by:
      urn in interface SimpleExtension.Anchor
      Returns:
      The value of the urn attribute
    • key

      public String key()
      Specified by:
      key in interface SimpleExtension.Anchor
      Returns:
      The value of the key attribute
    • withUrn

      public final ImmutableSimpleExtension.TypeAnchor withUrn(String value)
      Copy the current immutable object by setting a value for the urn attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for urn
      Returns:
      A modified copy or the this object
    • withKey

      public final ImmutableSimpleExtension.TypeAnchor withKey(String value)
      Copy the current immutable object by setting a value for the key attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for key
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      Creates a builder for TypeAnchor.
       ImmutableSimpleExtension.TypeAnchor.builder()
          .urn(String) // required urn
          .key(String) // required key
          .build();
       
      Returns:
      A new TypeAnchor builder