Class Answers

java.lang.Object
com.aquima.interactions.dtree.Answers
All Implemented Interfaces:
IAnswers, Serializable

public class Answers extends Object implements IAnswers
This object holds the attributes that should be answered.
Since:
5.0
Author:
F. van der Meer
See Also:
  • Constructor Details

    • Answers

      public Answers()
      Constructs an empty answers object.
    • Answers

      public Answers(ValueReference... references)
      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

      public Answers(List<ValueReference> valueReferences)
      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

      public boolean isAnswered(ValueReference valueReference)
      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 interface IAnswers
      Parameters:
      valueReference - The question reference.
      Returns:
      true When the tree engine should be instructed not to ask this question again. false otherwise.
    • addAnswer

      public boolean addAnswer(ValueReference valueReference)
      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.