Package io.substrait.plan
Class ImmutableRoot
java.lang.Object
io.substrait.plan.Plan.Root
io.substrait.plan.ImmutableRoot
Immutable implementation of
Plan.Root.
Use the builder to create immutable instances:
ImmutableRoot.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableRoot.Builderbuilder()Creates a builder forImmutableRoot.static ImmutableRootCreates an immutable copy of aPlan.Rootvalue.booleanThis instance is equal to all instances ofImmutableRootthat have equal attribute values.getInput()getNames()inthashCode()Computes a hash code from attributes:input,names.toString()Prints the immutable valueRootwith attribute values.final ImmutableRootCopy the current immutable object by setting a value for theinputattribute.final ImmutableRootCopy the current immutable object with elements that replace the content ofnames.final ImmutableRootCopy the current immutable object with elements that replace the content ofnames.
-
Method Details
-
getInput
-
getNames
-
withInput
Copy the current immutable object by setting a value for theinputattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for input- Returns:
- A modified copy or the
thisobject
-
withNames
Copy the current immutable object with elements that replace the content ofnames.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNames
Copy the current immutable object with elements that replace the content ofnames. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of names elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableRootthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:input,names. -
toString
Prints the immutable valueRootwith attribute values. -
copyOf
Creates an immutable copy of aPlan.Rootvalue. 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 Root instance
-
builder
Creates a builder forImmutableRoot.ImmutableRoot.builder() .input(io.substrait.relation.Rel) // requiredinput.addNames|addAllNames(String) //nameselements .build();- Returns:
- A new ImmutableRoot builder
-