org.aitools.programd.test.aiml
Class AnswerChecker
java.lang.Object
org.aitools.programd.test.aiml.Checker
org.aitools.programd.test.aiml.AnswerChecker
public class AnswerChecker
- extends Checker
Tests whether a given input equals an expected string.
- Author:
- Albertas Mickensas, Noel Bush
| Methods inherited from class org.aitools.programd.test.aiml.Checker |
create |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnswerChecker
public AnswerChecker(Element element,
String encoding)
- Creates a new AnswerChecker with the given expected answer.
- Parameters:
element - the element containing the expected answerencoding - the encoding of the document from which the element comes
AnswerChecker
public AnswerChecker(String answer)
- Creates a new AnswerChecked with the given expected answer.
- Parameters:
answer - the expected answer
test
public boolean test(String input)
- Tests whether the given input matches the expected answer.
- Specified by:
test in class Checker
- Parameters:
input - the input to test
- Returns:
- whether the given input matches the expected answer
- See Also:
Checker.test(java.lang.String)
getContent
public String getContent()
- Specified by:
getContent in class Checker
- Returns:
- the textual content of the checker
- See Also:
Checker.getContent()
getTagName
public String getTagName()
- Specified by:
getTagName in class Checker
- Returns:
- the tag name that the checker uses
- See Also:
Checker.getTagName()