Package io.dialob.program.expr.arith
Class ImmutableToStringOperator
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableToStringOperator
-
- All Implemented Interfaces:
ToStringOperator,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableToStringOperator extends Object implements ToStringOperator
Immutable implementation ofToStringOperator.Use the builder to create immutable instances:
ImmutableToStringOperator.builder(). Use the static factory method to create immutable instances:ImmutableToStringOperator.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableToStringOperator.BuilderBuilds instances of typeImmutableToStringOperator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableToStringOperator.Builderbuilder()Creates a builder forImmutableToStringOperator.static ImmutableToStringOperatorcopyOf(ToStringOperator instance)Creates an immutable copy of aToStringOperatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableToStringOperatorthat have equal attribute values.ExpressiongetExpression()inthashCode()Computes a hash code from attributes:expression.static ImmutableToStringOperatorof(Expression expression)Construct a new immutableToStringOperatorinstance.StringtoString()Prints the immutable valueToStringOperatorwith attribute values.ImmutableToStringOperatorwithExpression(Expression value)Copy the current immutable object by setting a value for theexpressionattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.arith.ToStringOperator
eval, getEvalRequiredConditions, getValueType
-
-
-
-
Method Detail
-
getExpression
public Expression getExpression()
- Specified by:
getExpressionin interfaceToStringOperator- Returns:
- The value of the
expressionattribute
-
withExpression
public final ImmutableToStringOperator withExpression(Expression value)
Copy the current immutable object by setting a value for theexpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expression- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableToStringOperatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:expression.
-
toString
public String toString()
Prints the immutable valueToStringOperatorwith attribute values.
-
of
public static ImmutableToStringOperator of(Expression expression)
Construct a new immutableToStringOperatorinstance.- Parameters:
expression- The value for theexpressionattribute- Returns:
- An immutable ToStringOperator instance
-
copyOf
public static ImmutableToStringOperator copyOf(ToStringOperator instance)
Creates an immutable copy of aToStringOperatorvalue. 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 ToStringOperator instance
-
builder
public static ImmutableToStringOperator.Builder builder()
Creates a builder forImmutableToStringOperator.ImmutableToStringOperator.builder() .expression(io.dialob.program.model.Expression) // requiredexpression.build();- Returns:
- A new ImmutableToStringOperator builder
-
-