Package io.substrait.extension
Class ImmutableSimpleExtension.ExtensionCollection
java.lang.Object
io.substrait.extension.SimpleExtension.ExtensionCollection
io.substrait.extension.ImmutableSimpleExtension.ExtensionCollection
- Enclosing class:
- ImmutableSimpleExtension
public static final class ImmutableSimpleExtension.ExtensionCollection
extends SimpleExtension.ExtensionCollection
Immutable implementation of
SimpleExtension.ExtensionCollection.
Use the builder to create immutable instances:
ImmutableSimpleExtension.ExtensionCollection.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeExtensionCollection. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forExtensionCollection.copyOf(SimpleExtension.ExtensionCollection instance) Creates an immutable copy of aSimpleExtension.ExtensionCollectionvalue.booleanThis instance is equal to all instances ofExtensionCollectionthat have equal attribute values.inthashCode()Computes a hash code from attributes:extensionMetadata,types,scalarFunctions,aggregateFunctions,windowFunctions.toString()Prints the immutable valueExtensionCollectionwith attribute values.types()Copy the current immutable object with elements that replace the content ofaggregateFunctions.withAggregateFunctions(Iterable<? extends SimpleExtension.AggregateFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofaggregateFunctions.Copy the current immutable object by replacing theextensionMetadatamap with the specified map.withScalarFunctions(SimpleExtension.ScalarFunctionVariant... elements) Copy the current immutable object with elements that replace the content ofscalarFunctions.withScalarFunctions(Iterable<? extends SimpleExtension.ScalarFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofscalarFunctions.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.withWindowFunctions(SimpleExtension.WindowFunctionVariant... elements) Copy the current immutable object with elements that replace the content ofwindowFunctions.withWindowFunctions(Iterable<? extends SimpleExtension.WindowFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofwindowFunctions.Methods inherited from class io.substrait.extension.SimpleExtension.ExtensionCollection
getAggregateFunction, getExtensionMetadata, getScalarFunction, getType, getWindowFunction, merge
-
Method Details
-
extensionMetadata
- Overrides:
extensionMetadatain classSimpleExtension.ExtensionCollection- Returns:
- The value of the
extensionMetadataattribute
-
types
- Specified by:
typesin classSimpleExtension.ExtensionCollection- Returns:
- The value of the
typesattribute
-
scalarFunctions
- Specified by:
scalarFunctionsin classSimpleExtension.ExtensionCollection- Returns:
- The value of the
scalarFunctionsattribute
-
aggregateFunctions
- Specified by:
aggregateFunctionsin classSimpleExtension.ExtensionCollection- Returns:
- The value of the
aggregateFunctionsattribute
-
windowFunctions
- Specified by:
windowFunctionsin classSimpleExtension.ExtensionCollection- Returns:
- The value of the
windowFunctionsattribute
-
withExtensionMetadata
public final ImmutableSimpleExtension.ExtensionCollection withExtensionMetadata(Map<String, ? extends Map<String, Object>> entries) Copy the current immutable object by replacing theextensionMetadatamap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to replace the extensionMetadata map- Returns:
- A modified copy or
thisif not changed
-
withTypes
public final ImmutableSimpleExtension.ExtensionCollection 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.ExtensionCollection 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
-
withScalarFunctions
public final ImmutableSimpleExtension.ExtensionCollection withScalarFunctions(SimpleExtension.ScalarFunctionVariant... elements) Copy the current immutable object with elements that replace the content ofscalarFunctions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withScalarFunctions
public final ImmutableSimpleExtension.ExtensionCollection withScalarFunctions(Iterable<? extends SimpleExtension.ScalarFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofscalarFunctions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of scalarFunctions elements to set- Returns:
- A modified copy or
thisif not changed
-
withAggregateFunctions
public final ImmutableSimpleExtension.ExtensionCollection withAggregateFunctions(SimpleExtension.AggregateFunctionVariant... elements) Copy the current immutable object with elements that replace the content ofaggregateFunctions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAggregateFunctions
public final ImmutableSimpleExtension.ExtensionCollection withAggregateFunctions(Iterable<? extends SimpleExtension.AggregateFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofaggregateFunctions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of aggregateFunctions elements to set- Returns:
- A modified copy or
thisif not changed
-
withWindowFunctions
public final ImmutableSimpleExtension.ExtensionCollection withWindowFunctions(SimpleExtension.WindowFunctionVariant... elements) Copy the current immutable object with elements that replace the content ofwindowFunctions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWindowFunctions
public final ImmutableSimpleExtension.ExtensionCollection withWindowFunctions(Iterable<? extends SimpleExtension.WindowFunctionVariant> elements) Copy the current immutable object with elements that replace the content ofwindowFunctions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of windowFunctions elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofExtensionCollectionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extensionMetadata,types,scalarFunctions,aggregateFunctions,windowFunctions. -
toString
Prints the immutable valueExtensionCollectionwith attribute values. -
copyOf
public static ImmutableSimpleExtension.ExtensionCollection copyOf(SimpleExtension.ExtensionCollection instance) Creates an immutable copy of aSimpleExtension.ExtensionCollectionvalue. 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 ExtensionCollection instance
-
builder
Creates a builder forExtensionCollection.ImmutableSimpleExtension.ExtensionCollection.builder() .putExtensionMetadata|putAllExtensionMetadata(String => Map<String, Object>) //extensionMetadatamappings .addTypes|addAllTypes(io.substrait.extension.SimpleExtension.Type) //typeselements .addScalarFunctions|addAllScalarFunctions(io.substrait.extension.SimpleExtension.ScalarFunctionVariant) //scalarFunctionselements .addAggregateFunctions|addAllAggregateFunctions(io.substrait.extension.SimpleExtension.AggregateFunctionVariant) //aggregateFunctionselements .addWindowFunctions|addAllWindowFunctions(io.substrait.extension.SimpleExtension.WindowFunctionVariant) //windowFunctionselements .build();- Returns:
- A new ExtensionCollection builder
-