Package io.substrait.relation.physical
Class ImmutableExchangeTarget.Builder
java.lang.Object
io.substrait.relation.physical.ImmutableExchangeTarget.Builder
- Enclosing class:
- ImmutableExchangeTarget
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 Summary
Modifier and TypeMethodDescriptionaddAllPartitionIds(Iterable<Integer> elements) Adds elements topartitionIdslist.addPartitionIds(int element) Adds one element topartitionIdslist.addPartitionIds(int... elements) Adds elements topartitionIdslist.build()Builds a newImmutableExchangeTarget.from(AbstractExchangeRel.ExchangeTarget instance) Fill a builder with attribute values from the providedExchangeTargetinstance.partitionIds(Iterable<Integer> elements) Sets or replaces all elements forpartitionIdslist.type(TargetType type) Initializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedExchangeTargetinstance. 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:
thisbuilder for use in a chained invocation
-
addPartitionIds
Adds one element topartitionIdslist.- Parameters:
element- A partitionIds element- Returns:
thisbuilder for use in a chained invocation
-
addPartitionIds
Adds elements topartitionIdslist.- Parameters:
elements- An array of partitionIds elements- Returns:
thisbuilder for use in a chained invocation
-
partitionIds
Sets or replaces all elements forpartitionIdslist.- Parameters:
elements- An iterable of partitionIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPartitionIds
Adds elements topartitionIdslist.- Parameters:
elements- An iterable of partitionIds elements- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableExchangeTarget.- Returns:
- An immutable instance of ExchangeTarget
- Throws:
IllegalStateException- if any required attributes are missing
-