java.lang.Object
com.tripi.asp.DefaultNode
com.tripi.asp.CaseNode
- All Implemented Interfaces:
- Node
- public class CaseNode
- extends DefaultNode
Implements the case part of the select..case statement.
- Version:
- 0.9
|
Field Summary |
(package private) BlockNode |
exec
Code to execute if one of the tests evaluate to true |
(package private) VarListNode |
tests
List of tests for this case |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tests
VarListNode tests
- List of tests for this case
exec
BlockNode exec
- Code to execute if one of the tests evaluate to true
CaseNode
public CaseNode(VarListNode tests,
BlockNode exec)
- Constructor to create a new case node.
dump
public void dump()
throws AspException
- Dumps this case node.
- Specified by:
dump in interface Node- Overrides:
dump in class DefaultNode
matches
public boolean matches(java.lang.Object value,
AspContext context)
throws AspException
- Checks if the test matches the case node.
prepare
public void prepare(AspContext context)
throws AspException
- Prepares this node. Calls prepare on children nodes.
- Specified by:
prepare in interface Node- Overrides:
prepare in class DefaultNode
execute
public java.lang.Object execute(AspContext context)
throws AspException
- Executes this case node.
- Specified by:
execute in interface Node- Overrides:
execute in class DefaultNode