Package io.substrait.expression
Class ImmutableListElement
java.lang.Object
io.substrait.expression.FieldReference.ListElement
io.substrait.expression.ImmutableListElement
- All Implemented Interfaces:
FieldReference.ReferenceSegment
Immutable implementation of
FieldReference.ListElement.
Use the builder to create immutable instances:
ImmutableListElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableListElement. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableListElement.Builderbuilder()Creates a builder forImmutableListElement.static ImmutableListElementcopyOf(FieldReference.ListElement instance) Creates an immutable copy of aFieldReference.ListElementvalue.booleanThis instance is equal to all instances ofImmutableListElementthat have equal attribute values.inthashCode()Computes a hash code from attributes:offset.intoffset()toString()Prints the immutable valueListElementwith attribute values.final ImmutableListElementwithOffset(int value) Copy the current immutable object by setting a value for theoffsetattribute.Methods inherited from class io.substrait.expression.FieldReference.ListElement
apply, constructOnExpression, constructOnRoot, of
-
Method Details
-
offset
public int offset()- Specified by:
offsetin classFieldReference.ListElement- Returns:
- The value of the
offsetattribute
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for offset- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableListElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:offset. -
toString
Prints the immutable valueListElementwith attribute values. -
copyOf
Creates an immutable copy of aFieldReference.ListElementvalue. 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 ListElement instance
-
builder
Creates a builder forImmutableListElement.ImmutableListElement.builder() .offset(int) // requiredoffset.build();- Returns:
- A new ImmutableListElement builder
-