Package io.substrait.extension
Class ImmutableSimpleExtension.Type
java.lang.Object
io.substrait.extension.SimpleExtension.Type
io.substrait.extension.ImmutableSimpleExtension.Type
- Enclosing class:
- ImmutableSimpleExtension
Immutable implementation of
SimpleExtension.Type.
Use the builder to create immutable instances:
ImmutableSimpleExtension.Type.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forType.copyOf(SimpleExtension.Type instance) Creates an immutable copy of aSimpleExtension.Typevalue.booleanThis instance is equal to all instances ofTypethat have equal attribute values.inthashCode()Computes a hash code from attributes:name,description,urn,structure,parameters,variadic,metadata.metadata()name()toString()Prints the immutable valueTypewith attribute values.urn()variadic()withDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.withDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.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.Copy the current immutable object by setting a value for thenameattribute.withParameters(List<Object> value) Copy the current immutable object by setting a present value for the optionalparametersattribute.withParameters(Optional<? extends List<Object>> optional) Copy the current immutable object by setting an optional value for theparametersattribute.withStructure(Object value) Copy the current immutable object by setting a present value for the optionalstructureattribute.withStructure(Optional<? extends Object> optional) Copy the current immutable object by setting an optional value for thestructureattribute.Copy the current immutable object by setting a value for theurnattribute.withVariadic(boolean value) Copy the current immutable object by setting a present value for the optionalvariadicattribute.withVariadic(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thevariadicattribute.Methods inherited from class io.substrait.extension.SimpleExtension.Type
getAnchor
-
Method Details
-
name
- Specified by:
namein classSimpleExtension.Type- Returns:
- The value of the
nameattribute
-
description
- Specified by:
descriptionin classSimpleExtension.Type- Returns:
- The value of the
descriptionattribute
-
urn
- Specified by:
urnin classSimpleExtension.Type- Returns:
- The value of the
urnattribute
-
structure
- Specified by:
structurein classSimpleExtension.Type- Returns:
- The value of the
structureattribute
-
parameters
- Specified by:
parametersin classSimpleExtension.Type- Returns:
- The value of the
parametersattribute
-
variadic
- Specified by:
variadicin classSimpleExtension.Type- Returns:
- The value of the
variadicattribute
-
metadata
- Specified by:
metadatain classSimpleExtension.Type- Returns:
- The value of the
metadataattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy or
thisif not changed
-
withDescription
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for description- 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
-
withStructure
Copy the current immutable object by setting a present value for the optionalstructureattribute.- Parameters:
value- The value for structure- Returns:
- A modified copy or
thisif not changed
-
withStructure
Copy the current immutable object by setting an optional value for thestructureattribute. 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 structure- Returns:
- A modified copy or
thisif not changed
-
withParameters
Copy the current immutable object by setting a present value for the optionalparametersattribute.- Parameters:
value- The value for parameters- Returns:
- A modified copy or
thisif not changed
-
withParameters
public final ImmutableSimpleExtension.Type withParameters(Optional<? extends List<Object>> optional) Copy the current immutable object by setting an optional value for theparametersattribute. 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 parameters- Returns:
- A modified copy or
thisif not changed
-
withVariadic
Copy the current immutable object by setting a present value for the optionalvariadicattribute.- Parameters:
value- The value for variadic- Returns:
- A modified copy or
thisif not changed
-
withVariadic
Copy the current immutable object by setting an optional value for thevariadicattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for variadic- 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.Type 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 ofTypethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,description,urn,structure,parameters,variadic,metadata. -
toString
Prints the immutable valueTypewith attribute values. -
copyOf
Creates an immutable copy of aSimpleExtension.Typevalue. 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 Type instance
-
builder
Creates a builder forType.ImmutableSimpleExtension.Type.builder() .name(String) // requiredname.description(Optional<String>) // optionaldescription.urn(String) // requiredurn.structure(Optional<Object>) // optionalstructure.parameters(Optional<List<Object>>) // optionalparameters.variadic(Optional<Boolean>) // optionalvariadic.metadata(Optional<Map<String, Object>>) // optionalmetadata.build();- Returns:
- A new Type builder
-