Package io.substrait.plan
Class ImmutableRoot.Builder
java.lang.Object
io.substrait.plan.ImmutableRoot.Builder
- Enclosing class:
- ImmutableRoot
Builds instances of type
ImmutableRoot.
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 TypeMethodDescriptionfinal ImmutableRoot.BuilderaddAllNames(Iterable<String> elements) Adds elements tonameslist.final ImmutableRoot.BuilderAdds one element tonameslist.final ImmutableRoot.BuilderAdds elements tonameslist.build()Builds a newImmutableRoot.final ImmutableRoot.BuilderFill a builder with attribute values from the providedRootinstance.final ImmutableRoot.BuilderInitializes the value for theinputattribute.final ImmutableRoot.BuilderSets or replaces all elements fornameslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedRootinstance. 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
-
input
Initializes the value for theinputattribute.- Parameters:
input- The value for input- Returns:
thisbuilder for use in a chained invocation
-
addNames
Adds one element tonameslist.- Parameters:
element- A names element- Returns:
thisbuilder for use in a chained invocation
-
addNames
Adds elements tonameslist.- Parameters:
elements- An array of names elements- Returns:
thisbuilder for use in a chained invocation
-
names
Sets or replaces all elements fornameslist.- Parameters:
elements- An iterable of names elements- Returns:
thisbuilder for use in a chained invocation
-
addAllNames
Adds elements tonameslist.- Parameters:
elements- An iterable of names elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableRoot.- Returns:
- An immutable instance of Root
- Throws:
IllegalStateException- if any required attributes are missing
-