java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.NodeList
All Implemented Interfaces:
ITslNode

public class NodeList extends Object implements ITslNode
TSL node representing a list of TSL nodes.
Since:
6.4
Author:
O. Kerpershoek
  • Constructor Details

    • NodeList

      public NodeList(ITslNode head)
      Constructs the TSL list with a single node.
      Parameters:
      head - The first node in the list.
    • NodeList

      public NodeList(Collection<ITslNode> list)
      Constructs the list from a collection of nodes.
      Parameters:
      list - Collection of nodes.
  • Method Details

    • append

      public NodeList append(ITslNode node)
      This method may be used to append a node to the list.
      Parameters:
      node - The node that should be added.
      Returns:
      Reference to this list to allow method chaining.
    • expand

      public void expand(IValueSource source, OutputBuffer output, ILanguage language)
      Description copied from interface: ITslNode
      The expand method should evaluate the node for the given language, and append the result to the output buffer supplied. When the node also contains child elements, this expand method should invoke the child elements too.
      Specified by:
      expand in interface ITslNode
      Parameters:
      source - Object containing the values for the current domain.
      output - The output buffer the result of this node should be appended to.
      language - The language for which the node should be evaluated.
    • size

      public int size()
      This method returns the number of nodes present in the list.
      Returns:
      the number of nodes present in the list.
    • nodeAt

      public ITslNode nodeAt(int index)
      This method returns the node at the specified index.
      Parameters:
      index - The index of the requested node.
      Returns:
      The node at the specified index.
    • visit

      public void visit(ITslNodeVisitor visitor)
      Description copied from interface: ITslNode
      This method allows visitation of the node. The visit method will not invoke the visitor for any child nodes.
      Specified by:
      visit in interface ITslNode
      Parameters:
      visitor - The visitor that should be invoked for this node.
    • toString

      public String toString()
      Overrides:
      toString in class Object