Class ExpressionR7

java.lang.Object
com.aquima.interactions.expressions.r7.ExpressionR7
All Implemented Interfaces:
IExpr, Serializable

public class ExpressionR7 extends Object implements IExpr
The expression class holds the parsed and checked expression. The class can return information on the expression, scoped objects and type.
Since:
6.4
Author:
F. van der Meer
See Also:
  • Constructor Details

  • Method Details

    • getExpression

      public String getExpression()
      Description copied from interface: IExpr
      This method will return the original expression string from which the expression was parsed.
      Specified by:
      getExpression in interface IExpr
      Returns:
      The original expression string.
    • isMultivalue

      public boolean isMultivalue()
      Description copied from interface: IExpr
      This method will return a boolean indicating if the result of an evaluation of the expression may contain multiple values. Expression which can result in multiple values, will always return a list value as result.
      Specified by:
      isMultivalue in interface IExpr
      Returns:
      Boolean indicating if the result can consist of multiple values.
    • getResultType

      public DataType getResultType()
      Description copied from interface: IExpr
      This method will return the data type of the result.
      Specified by:
      getResultType in interface IExpr
      Returns:
      the data type of the result.
    • getTypeName

      public String getTypeName()
      Description copied from interface: IExpr
      Returns the type name of the result type. This type can either be the entity's name or the domain's name, or null when the value isn't bound to a specific type.
      Specified by:
      getTypeName in interface IExpr
      Returns:
      the type name of the result type.
    • getScopeObjects

      public String[] getScopeObjects()
      Description copied from interface: IExpr
      Returns the root variables which are used from the profile. When the expression does not use any scoped objects, this method will return an empty array.
      Specified by:
      getScopeObjects in interface IExpr
      Returns:
      Array containing the names of the objects that need to be in scope.
    • evaluate

      public IValue evaluate(IValueSource source)
      Description copied from interface: IExpr
      This method will evaluate the expression for the context (source) provided.
      Note: This method might return a null value indicating the result of the expression is unknown. IF a THEN b<null value unexpected> ELSE c
      Specified by:
      evaluate in interface IExpr
      Parameters:
      source - Object containing context information that should be used during evaluation.
      Returns:
      The result of the expression.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object