Class ImmutableExchangeTarget.Builder

java.lang.Object
io.substrait.relation.physical.ImmutableExchangeTarget.Builder
Enclosing class:
ImmutableExchangeTarget

public static final class ImmutableExchangeTarget.Builder extends Object
Builds instances of type ImmutableExchangeTarget. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      Fill a builder with attribute values from the provided ExchangeTarget instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addPartitionIds

      public final ImmutableExchangeTarget.Builder addPartitionIds(int element)
      Adds one element to partitionIds list.
      Parameters:
      element - A partitionIds element
      Returns:
      this builder for use in a chained invocation
    • addPartitionIds

      public final ImmutableExchangeTarget.Builder addPartitionIds(int... elements)
      Adds elements to partitionIds list.
      Parameters:
      elements - An array of partitionIds elements
      Returns:
      this builder for use in a chained invocation
    • partitionIds

      public final ImmutableExchangeTarget.Builder partitionIds(Iterable<Integer> elements)
      Sets or replaces all elements for partitionIds list.
      Parameters:
      elements - An iterable of partitionIds elements
      Returns:
      this builder for use in a chained invocation
    • addAllPartitionIds

      public final ImmutableExchangeTarget.Builder addAllPartitionIds(Iterable<Integer> elements)
      Adds elements to partitionIds list.
      Parameters:
      elements - An iterable of partitionIds elements
      Returns:
      this builder for use in a chained invocation
    • type

      public final ImmutableExchangeTarget.Builder type(TargetType type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableExchangeTarget build()
      Returns:
      An immutable instance of ExchangeTarget
      Throws:
      IllegalStateException - if any required attributes are missing