Class ImmutableFunctionCallOperator

java.lang.Object
io.dialob.session.engine.program.expr.arith.ImmutableFunctionCallOperator
All Implemented Interfaces:
FunctionCallOperator, Expression, Serializable

@Generated(from="FunctionCallOperator", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFunctionCallOperator extends Object implements FunctionCallOperator
Immutable implementation of FunctionCallOperator.

Use the builder to create immutable instances: ImmutableFunctionCallOperator.builder().

See Also:
  • Method Details

    • getValueType

      public ValueType getValueType()
      Specified by:
      getValueType in interface Expression
      Specified by:
      getValueType in interface FunctionCallOperator
      Returns:
      The value of the valueType attribute
    • getFunctionName

      public String getFunctionName()
      Specified by:
      getFunctionName in interface FunctionCallOperator
      Returns:
      The value of the functionName attribute
    • getArgs

      public com.google.common.collect.ImmutableList<Expression> getArgs()
      Specified by:
      getArgs in interface FunctionCallOperator
      Returns:
      The value of the args attribute
    • withValueType

      public final ImmutableFunctionCallOperator withValueType(ValueType value)
      Copy the current immutable object by setting a value for the valueType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for valueType
      Returns:
      A modified copy or the this object
    • withFunctionName

      public final ImmutableFunctionCallOperator withFunctionName(String value)
      Copy the current immutable object by setting a value for the functionName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for functionName
      Returns:
      A modified copy or the this object
    • withArgs

      public final ImmutableFunctionCallOperator withArgs(Expression... elements)
      Copy the current immutable object with elements that replace the content of args.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withArgs

      public final ImmutableFunctionCallOperator withArgs(Iterable<? extends Expression> elements)
      Copy the current immutable object with elements that replace the content of args. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of args elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableFunctionCallOperator that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: valueType, functionName, args.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value FunctionCallOperator with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableFunctionCallOperator copyOf(FunctionCallOperator instance)
      Creates an immutable copy of a FunctionCallOperator value. 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 for ImmutableFunctionCallOperator.
       ImmutableFunctionCallOperator.builder()
          .valueType(io.dialob.rule.parser.api.ValueType) // required valueType
          .functionName(String) // required functionName
          .addArgs|addAllArgs(io.dialob.session.engine.program.model.Expression) // args elements
          .build();
       
      Returns:
      A new ImmutableFunctionCallOperator builder