Package io.substrait.type
Class ImmutableNamedStruct.Builder
java.lang.Object
io.substrait.type.ImmutableNamedStruct.Builder
- Enclosing class:
- ImmutableNamedStruct
Builds instances of type
ImmutableNamedStruct.
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 TypeMethodDescriptionaddAllNames(Iterable<String> elements) Adds elements tonameslist.Adds one element tonameslist.Adds elements tonameslist.build()Builds a newImmutableNamedStruct.from(NamedStruct instance) Fill a builder with attribute values from the providedNamedStructinstance.Sets or replaces all elements fornameslist.struct(Type.Struct struct) Initializes the value for thestructattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNamedStructinstance. 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
-
struct
Initializes the value for thestructattribute.- Parameters:
struct- The value for struct- 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 newImmutableNamedStruct.- Returns:
- An immutable instance of NamedStruct
- Throws:
IllegalStateException- if any required attributes are missing
-