class DelpAnswer extends Answer
true <=> YES <=> Double(0)
false <= NO <=> negative number
false <= UNDECIDED <=> positive number
true
can be reliably mapped to YES, whereas
false
remains ambiguous.Modifier and Type | Class and Description |
---|---|
(package private) static class |
DelpAnswer.Type |
Modifier and Type | Field and Description |
---|---|
private DelpAnswer.Type |
currentType |
Constructor and Description |
---|
DelpAnswer(BeliefBase beliefBase,
Formula query) |
Modifier and Type | Method and Description |
---|---|
void |
appendText(java.lang.String text)
Appends the given text to this answer's text.
|
boolean |
getAnswerBoolean()
Returns the boolean form of this answer.
|
java.lang.Double |
getAnswerDouble()
Returns the double form of this answer.
|
DelpAnswer.Type |
getType()
Obtain current type of this answer.
|
void |
setAnswer(boolean answer)
The answer of the query in boolean form.
|
void |
setAnswer(java.lang.Double answer)
The answer of the query in boolean form.
|
void |
setType(DelpAnswer.Type type) |
getKnowledgeBase, getQuery, getText, toString
private DelpAnswer.Type currentType
DelpAnswer(BeliefBase beliefBase, Formula query)
public DelpAnswer.Type getType()
public void setType(DelpAnswer.Type type)
public void appendText(java.lang.String text)
Answer
appendText
in class Answer
text
- a string.public void setAnswer(boolean answer)
Answer
public void setAnswer(java.lang.Double answer)
Answer
public boolean getAnswerBoolean()
Answer
getAnswerBoolean
in class Answer
public java.lang.Double getAnswerDouble()
Answer
getAnswerDouble
in class Answer