Package io.dialob.program.expr.arith
Class ImmutableFunctionCallOperator
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableFunctionCallOperator
-
- All Implemented Interfaces:
FunctionCallOperator,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFunctionCallOperator extends Object implements FunctionCallOperator
Immutable implementation ofFunctionCallOperator.Use the builder to create immutable instances:
ImmutableFunctionCallOperator.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFunctionCallOperator.BuilderBuilds instances of typeImmutableFunctionCallOperator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFunctionCallOperator.Builderbuilder()Creates a builder forImmutableFunctionCallOperator.static ImmutableFunctionCallOperatorcopyOf(FunctionCallOperator instance)Creates an immutable copy of aFunctionCallOperatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFunctionCallOperatorthat have equal attribute values.com.google.common.collect.ImmutableList<Expression>getArgs()StringgetFunctionName()ValueTypegetValueType()inthashCode()Computes a hash code from attributes:valueType,functionName,args.StringtoString()Prints the immutable valueFunctionCallOperatorwith attribute values.ImmutableFunctionCallOperatorwithArgs(Expression... elements)Copy the current immutable object with elements that replace the content ofargs.ImmutableFunctionCallOperatorwithArgs(Iterable<? extends Expression> elements)Copy the current immutable object with elements that replace the content ofargs.ImmutableFunctionCallOperatorwithFunctionName(String value)Copy the current immutable object by setting a value for thefunctionNameattribute.ImmutableFunctionCallOperatorwithValueType(ValueType value)Copy the current immutable object by setting a value for thevalueTypeattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.arith.FunctionCallOperator
eval, getEvalRequiredConditions
-
-
-
-
Method Detail
-
getValueType
public ValueType getValueType()
- Specified by:
getValueTypein interfaceExpression- Specified by:
getValueTypein interfaceFunctionCallOperator- Returns:
- The value of the
valueTypeattribute
-
getFunctionName
public String getFunctionName()
- Specified by:
getFunctionNamein interfaceFunctionCallOperator- Returns:
- The value of the
functionNameattribute
-
getArgs
public com.google.common.collect.ImmutableList<Expression> getArgs()
- Specified by:
getArgsin interfaceFunctionCallOperator- Returns:
- The value of the
argsattribute
-
withValueType
public final ImmutableFunctionCallOperator withValueType(ValueType value)
Copy the current immutable object by setting a value for thevalueTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueType- Returns:
- A modified copy of the
thisobject
-
withFunctionName
public final ImmutableFunctionCallOperator withFunctionName(String value)
Copy the current immutable object by setting a value for thefunctionNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for functionName- Returns:
- A modified copy of the
thisobject
-
withArgs
public final ImmutableFunctionCallOperator withArgs(Expression... elements)
Copy the current immutable object with elements that replace the content ofargs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArgs
public final ImmutableFunctionCallOperator withArgs(Iterable<? extends Expression> elements)
Copy the current immutable object with elements that replace the content ofargs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of args elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFunctionCallOperatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:valueType,functionName,args.
-
toString
public String toString()
Prints the immutable valueFunctionCallOperatorwith attribute values.
-
copyOf
public static ImmutableFunctionCallOperator copyOf(FunctionCallOperator instance)
Creates an immutable copy of aFunctionCallOperatorvalue. 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 FunctionCallOperator instance
-
builder
public static ImmutableFunctionCallOperator.Builder builder()
Creates a builder forImmutableFunctionCallOperator.ImmutableFunctionCallOperator.builder() .valueType(io.dialob.rule.parser.api.ValueType) // requiredvalueType.functionName(String) // requiredfunctionName.addArgs|addAllArgs(io.dialob.program.model.Expression) //argselements .build();- Returns:
- A new ImmutableFunctionCallOperator builder
-
-