Package io.substrait.relation
Class ImmutableSet
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.Set
io.substrait.relation.ImmutableSet
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
Set.
Use the builder to create immutable instances:
ImmutableSet.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableSet.Builderbuilder()Creates a builder forImmutableSet.static ImmutableSetCreates an immutable copy of aSetvalue.booleanThis instance is equal to all instances ofImmutableSetthat have equal attribute values.getHint()getRemap()getSetOp()inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,inputs,hint,setOp.toString()Prints the immutable valueSetwith attribute values.final ImmutableSetCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableSetwithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableSetwithExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.final ImmutableSetwithExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.final ImmutableSetCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableSetCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableSetwithInputs(Rel... elements) Copy the current immutable object with elements that replace the content ofinputs.final ImmutableSetwithInputs(Iterable<? extends Rel> elements) Copy the current immutable object with elements that replace the content ofinputs.final ImmutableSetCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableSetCopy the current immutable object by setting an optional value for theremapattribute.final ImmutableSetCopy the current immutable object by setting a value for thesetOpattribute.Methods inherited from class io.substrait.relation.Set
accept, deriveRecordTypeMethods inherited from class io.substrait.relation.AbstractRel
getRecordType
-
Method Details
-
getExtension
- Returns:
- the
AdvancedExtensionassociated directly with the class
-
getRemap
- Returns:
- The value of the
remapattribute
-
getCommonExtension
- Returns:
- the
AdvancedExtensionassociated with aRelCommonmessage, if present
-
getInputs
- Returns:
- The value of the
inputsattribute
-
getHint
- Returns:
- The value of the
hintattribute
-
getSetOp
-
withExtension
Copy the current immutable object by setting a present value for the optionalextensionattribute.- Parameters:
value- The value for extension- Returns:
- A modified copy or
thisif not changed
-
withExtension
Copy the current immutable object by setting an optional value for theextensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for extension- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting a present value for the optionalremapattribute.- Parameters:
value- The value for remap- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting an optional value for theremapattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for remap- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.- Parameters:
value- The value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting an optional value for thecommonExtensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withInputs
Copy the current immutable object with elements that replace the content ofinputs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withInputs
Copy the current immutable object with elements that replace the content ofinputs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of inputs elements to set- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting a present value for the optionalhintattribute.- Parameters:
value- The value for hint- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting an optional value for thehintattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for hint- Returns:
- A modified copy or
thisif not changed
-
withSetOp
Copy the current immutable object by setting a value for thesetOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for setOp- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableSetthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,inputs,hint,setOp. -
toString
Prints the immutable valueSetwith attribute values. -
copyOf
Creates an immutable copy of aSetvalue. 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 Set instance
-
builder
Creates a builder forImmutableSet.ImmutableSet.builder() .extension(Optional<io.substrait.extension.AdvancedExtension>) // optionalextension.remap(Optional<io.substrait.relation.Rel.Remap>) // optionalremap.commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optionalcommonExtension.addInputs|addAllInputs(io.substrait.relation.Rel) //inputselements .hint(Optional<io.substrait.hint.Hint>) // optionalhint.setOp(io.substrait.relation.Set.SetOp) // requiredsetOp.build();- Returns:
- A new ImmutableSet builder
-