irc.style
Class WordListRecognizer

java.lang.Object
  |
  +--irc.style.WordListRecognizer
All Implemented Interfaces:
WordRecognizer

public class WordListRecognizer
extends java.lang.Object
implements WordRecognizer

Recognizer for list of words.


Constructor Summary
WordListRecognizer()
          Create a new WordListRecognizer.
 
Method Summary
 java.lang.String getType()
          Get this recognizer type.
 boolean recognize(java.lang.String word)
          Try to recognize a word.
 void setList(java.lang.String[] list)
          Set the list of words to recognize.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordListRecognizer

public WordListRecognizer()
Create a new WordListRecognizer.

Method Detail

setList

public void setList(java.lang.String[] list)
Set the list of words to recognize.

Parameters:
list - the list of words.

recognize

public boolean recognize(java.lang.String word)
Description copied from interface: WordRecognizer
Try to recognize a word.

Specified by:
recognize in interface WordRecognizer
Parameters:
word - word to analyse.
Returns:
true if this word matches.

getType

public java.lang.String getType()
Description copied from interface: WordRecognizer
Get this recognizer type.

Specified by:
getType in interface WordRecognizer
Returns:
recognizer type name.