Package io.substrait.extension
Class ImmutableSimpleExtension.EnumArgument
java.lang.Object
io.substrait.extension.SimpleExtension.EnumArgument
io.substrait.extension.ImmutableSimpleExtension.EnumArgument
- All Implemented Interfaces:
SimpleExtension.Argument
- Enclosing class:
- ImmutableSimpleExtension
public static final class ImmutableSimpleExtension.EnumArgument
extends SimpleExtension.EnumArgument
Immutable implementation of
SimpleExtension.EnumArgument.
Use the builder to create immutable instances:
ImmutableSimpleExtension.EnumArgument.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forEnumArgument.copyOf(SimpleExtension.EnumArgument instance) Creates an immutable copy of aSimpleExtension.EnumArgumentvalue.@Nullable StringbooleanThis instance is equal to all instances ofEnumArgumentthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,description,options.@Nullable Stringname()options()toString()Prints the immutable valueEnumArgumentwith attribute values.withDescription(@Nullable String value) Copy the current immutable object by setting a value for thedescriptionattribute.Copy the current immutable object by setting a value for thenameattribute.withOptions(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofoptions.withOptions(String... elements) Copy the current immutable object with elements that replace the content ofoptions.Methods inherited from class io.substrait.extension.SimpleExtension.EnumArgument
required, toTypeString
-
Method Details
-
name
- Returns:
- The value of the
nameattribute
-
description
- Returns:
- The value of the
descriptionattribute
-
options
- Specified by:
optionsin classSimpleExtension.EnumArgument- Returns:
- The value of the
optionsattribute
-
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 (can benull)- Returns:
- A modified copy or the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy or the
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofEnumArgumentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,description,options. -
toString
Prints the immutable valueEnumArgumentwith attribute values. -
copyOf
Creates an immutable copy of aSimpleExtension.EnumArgumentvalue. 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 EnumArgument instance
-
builder
Creates a builder forEnumArgument.ImmutableSimpleExtension.EnumArgument.builder() .name(String | null) // nullablename.description(String | null) // nullabledescription.addOptions|addAllOptions(String) //optionselements .build();- Returns:
- A new EnumArgument builder
-