cmu.tawc.data
Class Word.DashWord

java.lang.Object
  extended by cmu.tawc.data.Word.WordStub
      extended by cmu.tawc.data.Word.ComboWord
          extended by cmu.tawc.data.Word.DashWord
All Implemented Interfaces:
Word
Enclosing interface:
Word

public static class Word.DashWord
extends Word.ComboWord


Nested Class Summary
 
Nested classes/interfaces inherited from interface cmu.tawc.data.Word
Word.ComboWord, Word.DashWord, Word.PlainWord, Word.RegexpWord, Word.WordStub
 
Field Summary
 
Fields inherited from class cmu.tawc.data.Word.ComboWord
comboWords
 
Constructor Summary
Word.DashWord(java.lang.String word, java.util.Vector<Category> categories)
           
 
Method Summary
 java.lang.String getWordPublicName()
           
 boolean matchesWord(java.lang.String word)
           
 boolean matchesWord(java.lang.String[] words, int index)
          Does this match a word in a sentence?
 
Methods inherited from class cmu.tawc.data.Word.WordStub
getCategories, getWord, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Word.DashWord

public Word.DashWord(java.lang.String word,
                     java.util.Vector<Category> categories)
Method Detail

getWordPublicName

public java.lang.String getWordPublicName()
Specified by:
getWordPublicName in interface Word
Overrides:
getWordPublicName in class Word.ComboWord

matchesWord

public boolean matchesWord(java.lang.String word)
Specified by:
matchesWord in interface Word
Overrides:
matchesWord in class Word.ComboWord
Returns:
number of times the Word matches the passed in sentence

matchesWord

public boolean matchesWord(java.lang.String[] words,
                           int index)
Description copied from interface: Word
Does this match a word in a sentence? Can match combo words, starting in one place.

Specified by:
matchesWord in interface Word
Overrides:
matchesWord in class Word.ComboWord
Returns: