Package io.dialob.program.expr.arith
Class ImmutableNegOperatorNumber
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableNegOperatorNumber
-
- All Implemented Interfaces:
NegOperator,NegOperatorNumber,UnaryOperator,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableNegOperatorNumber extends Object implements NegOperatorNumber
Immutable implementation ofNegOperatorNumber.Use the builder to create immutable instances:
ImmutableNegOperatorNumber.builder(). Use the static factory method to create immutable instances:ImmutableNegOperatorNumber.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNegOperatorNumber.BuilderBuilds instances of typeImmutableNegOperatorNumber.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableNegOperatorNumber.Builderbuilder()Creates a builder forImmutableNegOperatorNumber.static ImmutableNegOperatorNumbercopyOf(NegOperatorNumber instance)Creates an immutable copy of aNegOperatorNumbervalue.booleanequals(Object another)This instance is equal to all instances ofImmutableNegOperatorNumberthat have equal attribute values.ExpressiongetExpression()inthashCode()Computes a hash code from attributes:expression.static ImmutableNegOperatorNumberof(Expression expression)Construct a new immutableNegOperatorNumberinstance.StringtoString()Prints the immutable valueNegOperatorNumberwith attribute values.ImmutableNegOperatorNumberwithExpression(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.NegOperator
apply
-
Methods inherited from interface io.dialob.program.expr.arith.NegOperatorNumber
getValueType, neg
-
Methods inherited from interface io.dialob.program.expr.arith.UnaryOperator
eval, getEvalRequiredConditions
-
-
-
-
Method Detail
-
getExpression
public Expression getExpression()
- Specified by:
getExpressionin interfaceUnaryOperator- Returns:
- The value of the
expressionattribute
-
withExpression
public final ImmutableNegOperatorNumber 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 ofImmutableNegOperatorNumberthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:expression.
-
toString
public String toString()
Prints the immutable valueNegOperatorNumberwith attribute values.
-
of
public static ImmutableNegOperatorNumber of(Expression expression)
Construct a new immutableNegOperatorNumberinstance.- Parameters:
expression- The value for theexpressionattribute- Returns:
- An immutable NegOperatorNumber instance
-
copyOf
public static ImmutableNegOperatorNumber copyOf(NegOperatorNumber instance)
Creates an immutable copy of aNegOperatorNumbervalue. 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 NegOperatorNumber instance
-
builder
public static ImmutableNegOperatorNumber.Builder builder()
Creates a builder forImmutableNegOperatorNumber.ImmutableNegOperatorNumber.builder() .expression(io.dialob.program.model.Expression) // requiredexpression.build();- Returns:
- A new ImmutableNegOperatorNumber builder
-
-