Class ImmutableLoadedComputation

java.lang.Object
io.substrait.hint.Hint.LoadedComputation
io.substrait.hint.ImmutableLoadedComputation

public final class ImmutableLoadedComputation extends Hint.LoadedComputation
Immutable implementation of Hint.LoadedComputation.

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

  • Method Details

    • computationId

      public int computationId()
      Specified by:
      computationId in class Hint.LoadedComputation
      Returns:
      The value of the computationId attribute
    • computationType

      public Hint.ComputationType computationType()
      Specified by:
      computationType in class Hint.LoadedComputation
      Returns:
      The value of the computationType attribute
    • withComputationId

      public final ImmutableLoadedComputation withComputationId(int value)
      Copy the current immutable object by setting a value for the computationId attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for computationId
      Returns:
      A modified copy or the this object
    • withComputationType

      public final ImmutableLoadedComputation withComputationType(Hint.ComputationType value)
      Copy the current immutable object by setting a value for the computationType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for computationType
      Returns:
      A modified copy or the this object
    • equals

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

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

      public static ImmutableLoadedComputation copyOf(Hint.LoadedComputation instance)
      Creates an immutable copy of a Hint.LoadedComputation 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 LoadedComputation instance
    • builder

      public static ImmutableLoadedComputation.Builder builder()
      Creates a builder for ImmutableLoadedComputation.
       ImmutableLoadedComputation.builder()
          .computationId(int) // required computationId
          .computationType(io.substrait.hint.Hint.ComputationType) // required computationType
          .build();
       
      Returns:
      A new ImmutableLoadedComputation builder