java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.ForeachContext
All Implemented Interfaces:
IValueSource

public class ForeachContext extends Object implements IValueSource
Value source wrapped used by foreach loops.
Since:
6.4
Author:
O. Kerpershoek
  • Constructor Details

    • ForeachContext

      public ForeachContext(IValueSource source, String typeName, ICompoundValue compoundValue, int index)
      Creates the wrapper with the required arguments.
      Parameters:
      source - The original value source that should be wrapped.
      typeName - The entity type name of the objects that is iterated over.
      compoundValue - The entity instance.
      index - The index of the instance.
  • Method Details

    • getAllObjects

      public ICompoundValue[] getAllObjects(String name, boolean includeDerivedObjects)
      Description copied from interface: IValueSource
      This method can be used to request all objects of a specified type. When no objects are available for the specified type, an empty array should be returned.
      Specified by:
      getAllObjects in interface IValueSource
      Parameters:
      name - The type name for which all object are requested.
      includeDerivedObjects - Boolean indicating if objects derived from the specified type should also be returned.
      Returns:
      Array containing all objects of the specified type.
    • getObject

      public ICompoundValue getObject(String name)
      Description copied from interface: IValueSource
      This method will request an object that is either a singleton object or an active object (from the InstanceStack).
      Specified by:
      getObject in interface IValueSource
      Parameters:
      name - The type name for which the object value is requested.
      Returns:
      Object value for the specified type name.
    • getValue

      public IValue getValue(String name)
      Description copied from interface: IValueSource
      This method will be used to request a single static value. Examples of such values are Defines like
      • PI
      • TODAY
      • VERSION
      IF a THEN 10 IF a THEN 10 ELSE UNKNOWN In the example above this method will be called to request the value of a.
      Specified by:
      getValue in interface IValueSource
      Parameters:
      name - The name of the global value that is requested.
      Returns:
      The value for the specified name.
    • getNamedObject

      public ICompoundValue getNamedObject(String objectName, String instanceName)
      Description copied from interface: IValueSource
      This method will request an object that is a static instance.
      Specified by:
      getNamedObject in interface IValueSource
      Parameters:
      objectName - The name object the object
      instanceName - The name of the instance
      Returns:
      Object value for the specified type name, null when not known.