Package wt.rule.algorithm
Class CaseBranch
java.lang.Object
wt.rule.algorithm.CaseBranch
- All Implemented Interfaces:
RuleAlgorithm
This is a branch algorithm, which is similar to BooleanBranch, but allows any odd number of parts as input and allows
a default return.
What if the length passed in is not an odd number, throw exception immediately, since there isn't a default return
for the "case".If the odd number parameters passed is not a Boolean, throw exception.The exception message contains
which case failed to indicate the problem when happened.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptioncalculate(Object[] args, WTContainerRef container) Execute the algorithm using the specified arguments.
-
Method Details
-
calculate
Execute the algorithm using the specified arguments. Return the result.
Supported API: true- Specified by:
calculatein interfaceRuleAlgorithm- Parameters:
args- the arguments for the algorithmcontainer- the container to use for object lookups- Returns:
- Object
- Throws:
WTException
-