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
Locator
s in order to find all the required Coordinate
s.- Since:
- 0.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecisionFor
(String name) Computes the specifiedDecisionTable
result as a Dictionary.Finds aCoordinate
's value using internal set ofLocator
's.
-
Constructor Details
-
ComputationContext
Ctor.- Parameters:
locators
- TheLocators
instance to use.
-
-
Method Details
-
valueFor
Finds aCoordinate
's value using internal set ofLocator
's.- Parameters:
locator
- String identifier of theLocator
to use.fragment
- String identifier of the value to find.- Returns:
- The
String
value containing requested state. - Throws:
DecitaException
- If theLocator
wasn't found in the context.
-
decisionFor
Computes the specifiedDecisionTable
result 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.
-