Package com.aquima.interactions.dtree
Class Answers
java.lang.Object
com.aquima.interactions.dtree.Answers
- All Implemented Interfaces:
IAnswers
,Serializable
This object holds the attributes that should be answered.
- Since:
- 5.0
- Author:
- F. van der Meer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAnswers()
Constructs an empty answers object.Answers
(ValueReference... references) Constructs the answers object with the array of values that were answered.Answers
(List<ValueReference> valueReferences) Constructs the answers object with the list of values that were answered. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnswer
(ValueReference valueReference) This method may be used to add an answered value.boolean
isAnswered
(ValueReference valueReference) Used by the tree engine to determine if a certain question has already been asked and the tree engine should not ask this again.
-
Constructor Details
-
Answers
public Answers()Constructs an empty answers object. -
Answers
Constructs the answers object with the array of values that were answered.- Parameters:
references
- An array containing the references to the values that were answered.
-
Answers
Constructs the answers object with the list of values that were answered.- Parameters:
valueReferences
- An list containing the references to the values that were answered.
-
-
Method Details
-
isAnswered
Description copied from interface:IAnswers
Used by the tree engine to determine if a certain question has already been asked and the tree engine should not ask this again.- Specified by:
isAnswered
in interfaceIAnswers
- Parameters:
valueReference
- The question reference.- Returns:
- true When the tree engine should be instructed not to ask this question again. false otherwise.
-
addAnswer
This method may be used to add an answered value.- Parameters:
valueReference
- Reference to the value that was answered.- Returns:
- Boolean indicating if the value reference was added.
-