Package ru.ewc.decita
Class ComputationContext
java.lang.Object
ru.ewc.decita.ComputationContext
I am the container for all the things, required for TruthTable evaluation. My main responsibility
is to provide the set of
Locators in order to find all the required Coordinates.- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecisionFor(String name) Computes the specifiedDecisionTableresult as a Dictionary.Finds aCoordinate's value using internal set ofLocator's.
-
Constructor Details
-
ComputationContext
Ctor.- Parameters:
locators- TheLocatorsinstance to use.
-
-
Method Details
-
valueFor
Finds aCoordinate's value using internal set ofLocator's.- Parameters:
locator- String identifier of theLocatorto use.fragment- String identifier of the value to find.- Returns:
- The
Stringvalue containing requested state. - Throws:
DecitaException- If theLocatorwasn't found in the context.
-
decisionFor
Computes the specifiedDecisionTableresult as a Dictionary.- Parameters:
name- The name of the table to compute.- Returns:
- The Dictionary containing the decision result.
- Throws:
DecitaException- If the table could not be found or computed.
-