Package io.substrait.expression
Class ImmutableMapKey
java.lang.Object
io.substrait.expression.FieldReference.MapKey
io.substrait.expression.ImmutableMapKey
- All Implemented Interfaces:
FieldReference.ReferenceSegment
Immutable implementation of
FieldReference.MapKey.
Use the builder to create immutable instances:
ImmutableMapKey.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableMapKey.Builderbuilder()Creates a builder forImmutableMapKey.static ImmutableMapKeycopyOf(FieldReference.MapKey instance) Creates an immutable copy of aFieldReference.MapKeyvalue.booleanThis instance is equal to all instances ofImmutableMapKeythat have equal attribute values.inthashCode()Computes a hash code from attributes:key.key()toString()Prints the immutable valueMapKeywith attribute values.final ImmutableMapKeywithKey(Expression.Literal value) Copy the current immutable object by setting a value for thekeyattribute.Methods inherited from class io.substrait.expression.FieldReference.MapKey
apply, constructOnExpression, constructOnRoot, of
-
Method Details
-
key
- Specified by:
keyin classFieldReference.MapKey- Returns:
- The value of the
keyattribute
-
withKey
Copy the current immutable object by setting a value for thekeyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableMapKeythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:key. -
toString
Prints the immutable valueMapKeywith attribute values. -
copyOf
Creates an immutable copy of aFieldReference.MapKeyvalue. 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 MapKey instance
-
builder
Creates a builder forImmutableMapKey.ImmutableMapKey.builder() .key(io.substrait.expression.Expression.Literal) // requiredkey.build();- Returns:
- A new ImmutableMapKey builder
-