Package io.substrait.relation
Class ImmutableExpand.SwitchingField
java.lang.Object
io.substrait.relation.Expand.SwitchingField
io.substrait.relation.ImmutableExpand.SwitchingField
- All Implemented Interfaces:
Expand.ExpandField
- Enclosing class:
- ImmutableExpand
Immutable implementation of
Expand.SwitchingField.
Use the builder to create immutable instances:
ImmutableExpand.SwitchingField.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSwitchingField.copyOf(Expand.SwitchingField instance) Creates an immutable copy of aExpand.SwitchingFieldvalue.booleanThis instance is equal to all instances ofSwitchingFieldthat have equal attribute values.Returns the duplicate expressions this field may switch between.inthashCode()Computes a hash code from attributes:duplicates.toString()Prints the immutable valueSwitchingFieldwith attribute values.withDuplicates(Expression... elements) Copy the current immutable object with elements that replace the content ofduplicates.withDuplicates(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofduplicates.Methods inherited from class io.substrait.relation.Expand.SwitchingField
getType
-
Method Details
-
getDuplicates
Returns the duplicate expressions this field may switch between.- Specified by:
getDuplicatesin classExpand.SwitchingField- Returns:
- list of duplicate expressions
-
withDuplicates
Copy the current immutable object with elements that replace the content ofduplicates.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDuplicates
Copy the current immutable object with elements that replace the content ofduplicates. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of duplicates elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSwitchingFieldthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:duplicates. -
toString
Prints the immutable valueSwitchingFieldwith attribute values. -
copyOf
Creates an immutable copy of aExpand.SwitchingFieldvalue. 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 SwitchingField instance
-
builder
Creates a builder forSwitchingField.ImmutableExpand.SwitchingField.builder() .addDuplicates|addAllDuplicates(io.substrait.expression.Expression) //duplicateselements .build();- Returns:
- A new SwitchingField builder
-