Class TreeResponse
- java.lang.Object
-
- com.aquima.interactions.dtree.impl.TreeResponse
-
- All Implemented Interfaces:
ITreeResponse
public class TreeResponse extends Object implements ITreeResponse
This class holds the response of a decision tree evaluation.- Since:
- 5.0
- Author:
- F. van der Meer
-
-
Constructor Summary
Constructors Constructor Description TreeResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addQuestion(ValueReference question)
protected void
addsolution(ISolution solution)
ValueReference[]
getAllAnswers()
This function returns all the answers which where given by the user and system inferenced answers This function is the union of implicit and explicit answers.ValueReference[]
getExplicitAnswers()
This function returns the answers which are a direct reference to the value of the question which was specified within the decisiontree-question node.ValueReference[]
getImplicitAnswers()
This function returns the answers which were given by the user due to an inference rule firing.ValueReference[]
getQuestions()
This function returns the list of questions which need to be answered for the next round of decision tree run.ISolution[]
getSolutions()
This function returns the solutions which where given by the tree evaluation.protected void
registerAnsweredQuestion(ValueReference answer, boolean isExplicit)
-
-
-
Method Detail
-
addQuestion
protected void addQuestion(ValueReference question)
-
addsolution
protected void addsolution(ISolution solution)
-
registerAnsweredQuestion
protected void registerAnsweredQuestion(ValueReference answer, boolean isExplicit)
-
getQuestions
public ValueReference[] getQuestions()
Description copied from interface:ITreeResponse
This function returns the list of questions which need to be answered for the next round of decision tree run.- Specified by:
getQuestions
in interfaceITreeResponse
- Returns:
- An array of ValueReference objects which can be zero-length but never null.
-
getSolutions
public ISolution[] getSolutions()
Description copied from interface:ITreeResponse
This function returns the solutions which where given by the tree evaluation.- Specified by:
getSolutions
in interfaceITreeResponse
- Returns:
- An array of solution objects which can be zero-length but never null.
-
getAllAnswers
public ValueReference[] getAllAnswers()
Description copied from interface:ITreeResponse
This function returns all the answers which where given by the user and system inferenced answers This function is the union of implicit and explicit answers.- Specified by:
getAllAnswers
in interfaceITreeResponse
- Returns:
- An array of ValueReference objects which can be zero-length but never null.
-
getExplicitAnswers
public ValueReference[] getExplicitAnswers()
Description copied from interface:ITreeResponse
This function returns the answers which are a direct reference to the value of the question which was specified within the decisiontree-question node.- Specified by:
getExplicitAnswers
in interfaceITreeResponse
- Returns:
- An array of ValueReference objects which can be zero-length but never null.
-
getImplicitAnswers
public ValueReference[] getImplicitAnswers()
Description copied from interface:ITreeResponse
This function returns the answers which were given by the user due to an inference rule firing.- Specified by:
getImplicitAnswers
in interfaceITreeResponse
- Returns:
- An array of ValueReference objects which can be zero-length but never null.
-
-