Class NodeList
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.NodeList
- All Implemented Interfaces:
ITslNode
TSL node representing a list of TSL nodes.
- Since:
- 6.4
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the TSL list with a single node.NodeList
(Collection<ITslNode> list) Constructs the list from a collection of nodes. -
Method Summary
Modifier and TypeMethodDescriptionThis method may be used to append a node to the list.void
expand
(IValueSource source, OutputBuffer output, ILanguage language) The expand method should evaluate the node for the given language, and append the result to the output buffer supplied.nodeAt
(int index) This method returns the node at the specified index.int
size()
This method returns the number of nodes present in the list.toString()
void
visit
(ITslNodeVisitor visitor) This method allows visitation of the node.
-
Constructor Details
-
NodeList
Constructs the TSL list with a single node.- Parameters:
head
- The first node in the list.
-
NodeList
Constructs the list from a collection of nodes.- Parameters:
list
- Collection of nodes.
-
-
Method Details
-
append
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
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. -
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
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
Description copied from interface:ITslNode
This method allows visitation of the node. The visit method will not invoke the visitor for any child nodes. -
toString
-