Class BooleanBranch

java.lang.Object
wt.rule.algorithm.BooleanBranch
All Implemented Interfaces:
RuleAlgorithm

public final class BooleanBranch extends Object implements RuleAlgorithm
This algorithm returns one of two values based on a boolean value. The algorithm takes three arguments:
  1. boolean value
  2. value to return if first argument is true
  3. value to return if first argumetn is false


Supported API: true

Extendable: false
  • Method Details

    • calculate

      public Object calculate(Object[] args, WTContainerRef container) throws WTException
      Execute the algorithm using the specified arguments. Return the result.

      Supported API: true
      Specified by:
      calculate in interface RuleAlgorithm
      Parameters:
      args - the arguments for the algorithm
      container - the container to use for object lookups
      Returns:
      Object
      Throws:
      WTException