Package io.substrait.extension
Class ImmutableSimpleExtension.ExtensionSignatures
java.lang.Object
io.substrait.extension.SimpleExtension.ExtensionSignatures
io.substrait.extension.ImmutableSimpleExtension.ExtensionSignatures
- Enclosing class:
- ImmutableSimpleExtension
public static final class ImmutableSimpleExtension.ExtensionSignatures
extends SimpleExtension.ExtensionSignatures
Immutable implementation of
SimpleExtension.ExtensionSignatures.
Use the builder to create immutable instances:
ImmutableSimpleExtension.ExtensionSignatures.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeExtensionSignatures. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forExtensionSignatures.copyOf(SimpleExtension.ExtensionSignatures instance) Creates an immutable copy of aSimpleExtension.ExtensionSignaturesvalue.booleanThis instance is equal to all instances ofExtensionSignaturesthat have equal attribute values.inthashCode()Computes a hash code from attributes:types,urn,scalars,aggregates,windows,metadata.metadata()scalars()toString()Prints the immutable valueExtensionSignatureswith attribute values.types()urn()windows()withAggregates(SimpleExtension.AggregateFunction... elements) Copy the current immutable object with elements that replace the content ofaggregates.withAggregates(Iterable<? extends SimpleExtension.AggregateFunction> elements) Copy the current immutable object with elements that replace the content ofaggregates.withMetadata(Map<String, Object> value) Copy the current immutable object by setting a present value for the optionalmetadataattribute.withMetadata(Optional<? extends Map<String, Object>> optional) Copy the current immutable object by setting an optional value for themetadataattribute.withScalars(SimpleExtension.ScalarFunction... elements) Copy the current immutable object with elements that replace the content ofscalars.withScalars(Iterable<? extends SimpleExtension.ScalarFunction> elements) Copy the current immutable object with elements that replace the content ofscalars.withTypes(SimpleExtension.Type... elements) Copy the current immutable object with elements that replace the content oftypes.withTypes(Iterable<? extends SimpleExtension.Type> elements) Copy the current immutable object with elements that replace the content oftypes.Copy the current immutable object by setting a value for theurnattribute.withWindows(SimpleExtension.WindowFunction... elements) Copy the current immutable object with elements that replace the content ofwindows.withWindows(Iterable<? extends SimpleExtension.WindowFunction> elements) Copy the current immutable object with elements that replace the content ofwindows.Methods inherited from class io.substrait.extension.SimpleExtension.ExtensionSignatures
resolve, size
-
Method Details
-
types
- Specified by:
typesin classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
typesattribute
-
urn
- Specified by:
urnin classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
urnattribute
-
scalars
- Specified by:
scalarsin classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
scalarsattribute
-
aggregates
- Specified by:
aggregatesin classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
aggregatesattribute
-
windows
- Specified by:
windowsin classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
windowsattribute
-
metadata
- Specified by:
metadatain classSimpleExtension.ExtensionSignatures- Returns:
- The value of the
metadataattribute
-
withTypes
public final ImmutableSimpleExtension.ExtensionSignatures withTypes(SimpleExtension.Type... elements) Copy the current immutable object with elements that replace the content oftypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypes
public final ImmutableSimpleExtension.ExtensionSignatures withTypes(Iterable<? extends SimpleExtension.Type> elements) Copy the current immutable object with elements that replace the content oftypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of types elements to set- Returns:
- A modified copy or
thisif not changed
-
withUrn
Copy the current immutable object by setting a value for theurnattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for urn- Returns:
- A modified copy or the
thisobject
-
withScalars
public final ImmutableSimpleExtension.ExtensionSignatures withScalars(SimpleExtension.ScalarFunction... elements) Copy the current immutable object with elements that replace the content ofscalars.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withScalars
public final ImmutableSimpleExtension.ExtensionSignatures withScalars(Iterable<? extends SimpleExtension.ScalarFunction> elements) Copy the current immutable object with elements that replace the content ofscalars. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of scalars elements to set- Returns:
- A modified copy or
thisif not changed
-
withAggregates
public final ImmutableSimpleExtension.ExtensionSignatures withAggregates(SimpleExtension.AggregateFunction... elements) Copy the current immutable object with elements that replace the content ofaggregates.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAggregates
public final ImmutableSimpleExtension.ExtensionSignatures withAggregates(Iterable<? extends SimpleExtension.AggregateFunction> elements) Copy the current immutable object with elements that replace the content ofaggregates. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of aggregates elements to set- Returns:
- A modified copy or
thisif not changed
-
withWindows
public final ImmutableSimpleExtension.ExtensionSignatures withWindows(SimpleExtension.WindowFunction... elements) Copy the current immutable object with elements that replace the content ofwindows.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWindows
public final ImmutableSimpleExtension.ExtensionSignatures withWindows(Iterable<? extends SimpleExtension.WindowFunction> elements) Copy the current immutable object with elements that replace the content ofwindows. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of windows elements to set- Returns:
- A modified copy or
thisif not changed
-
withMetadata
Copy the current immutable object by setting a present value for the optionalmetadataattribute.- Parameters:
value- The value for metadata- Returns:
- A modified copy or
thisif not changed
-
withMetadata
public final ImmutableSimpleExtension.ExtensionSignatures withMetadata(Optional<? extends Map<String, Object>> optional) Copy the current immutable object by setting an optional value for themetadataattribute. 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 metadata- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofExtensionSignaturesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:types,urn,scalars,aggregates,windows,metadata. -
toString
Prints the immutable valueExtensionSignatureswith attribute values. -
copyOf
public static ImmutableSimpleExtension.ExtensionSignatures copyOf(SimpleExtension.ExtensionSignatures instance) Creates an immutable copy of aSimpleExtension.ExtensionSignaturesvalue. 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 ExtensionSignatures instance
-
builder
Creates a builder forExtensionSignatures.ImmutableSimpleExtension.ExtensionSignatures.builder() .addTypes|addAllTypes(io.substrait.extension.SimpleExtension.Type) //typeselements .urn(String) // requiredurn.addScalars|addAllScalars(io.substrait.extension.SimpleExtension.ScalarFunction) //scalarselements .addAggregates|addAllAggregates(io.substrait.extension.SimpleExtension.AggregateFunction) //aggregateselements .addWindows|addAllWindows(io.substrait.extension.SimpleExtension.WindowFunction) //windowselements .metadata(Optional<Map<String, Object>>) // optionalmetadata.build();- Returns:
- A new ExtensionSignatures builder
-