org.aitools.programd.test.aiml
Class ExpectedKeywordChecker

java.lang.Object
  extended by org.aitools.programd.test.aiml.Checker
      extended by org.aitools.programd.test.aiml.ExpectedKeywordChecker
Direct Known Subclasses:
AlertKeywordChecker

public class ExpectedKeywordChecker
extends Checker

Checks that a string contains all of a list of expected keywords.

Author:
Albertas Mickensas, Noel Bush

Field Summary
 
Fields inherited from class org.aitools.programd.test.aiml.Checker
TAG_ALERT_KEYWORDS, TAG_EXPECTED_ANSWER, TAG_EXPECTED_KEYWORDS, TAG_EXPECTED_LENGTH, TAG_EXPECTED_MATCH
 
Constructor Summary
ExpectedKeywordChecker(String list)
          Creates a new ExpectedKeyWordChecker with a given list of expected keywords.
 
Method Summary
 String getContent()
           
 String getTagName()
           
 boolean test(String input)
          Checks that the given input contains all of this checker's configured list of expected keywords.
 
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
 

Constructor Detail

ExpectedKeywordChecker

public ExpectedKeywordChecker(String list)
Creates a new ExpectedKeyWordChecker with a given list of expected keywords.

Parameters:
list - the comma-separated list of keywords
Method Detail

test

public boolean test(String input)
Checks that the given input contains all of this checker's configured list of expected keywords.

Specified by:
test in class Checker
Parameters:
input - the input to test
Returns:
whether the given input passes the Checker's test
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()