Interface DecisionNode
-
public interface DecisionNodeRepresents the information contained in a decision node.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DecisionNodeComparisonTypegetComparisonFunction()Gets the comparison function.java.util.Collection<ParameterValue>getComparisonFunctionParameters()Gets all parameters configured in the decision node comparison function.java.util.Collection<DecisionField>getDecisionFields()Gets the list of all fields configured in the decision node.MatchingResultTypegetMatchingResult()Gets the result of the decision tree execution.java.lang.StringgetName()Gets the name of decision node.java.lang.BooleanisLastNode()
-
-
-
Method Detail
-
getName
java.lang.String getName()
Gets the name of decision node.- Returns:
- String The decision node's name.
-
getComparisonFunction
DecisionNodeComparisonType getComparisonFunction()
Gets the comparison function.- Returns:
- DecisionNodeComparisonFunction The function used to compare fields.
- Throws:
java.lang.IllegalStateException- when this node is the last node in a decision tree.- See Also:
isLastNode()
-
getComparisonFunctionParameters
java.util.Collection<ParameterValue> getComparisonFunctionParameters()
Gets all parameters configured in the decision node comparison function.-
For
DecisionNodeComparisonType.ALL_FIELD_MATCH, no parameter is used -
For
DecisionNodeComparisonType.AT_LEAST_N_FIELD_MATCH, a parameter namedminimumNumberOfMatchesis used -
For
DecisionNodeComparisonType.AVERAGE, a parameter namedminimumScoreis used
- Returns:
- Collection
All parameters used to execute a comparison function.
-
For
-
getDecisionFields
java.util.Collection<DecisionField> getDecisionFields()
Gets the list of all fields configured in the decision node.- Returns:
- Collection
All fields configured in the decision node. - Throws:
java.lang.IllegalStateException- when this node is the last node in a decision tree.- See Also:
isLastNode()
-
getMatchingResult
MatchingResultType getMatchingResult()
Gets the result of the decision tree execution.- Returns:
- MatchingResultType The decision tree execution result.
- Throws:
java.lang.IllegalStateException- when this node is not the last node in a decision tree.- See Also:
isLastNode()
-
isLastNode
java.lang.Boolean isLastNode()
- Returns:
trueif this node is the last node in a decision tree. (result of the decision tree execution)
-
-