|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.parser.pdax.PDAX2MDAG.GrepCallback
private class PDAX2MDAG.GrepCallback
An inner class, that implements the StreamGobblerCallback to count the occurences of a word in a document.
| Field Summary | |
|---|---|
private int |
mCount
The number of times the word appears. |
private String |
mWord
The word that is to be searched for. |
private int |
mWordLength
The length of the word to be searched for. |
| Constructor Summary | |
|---|---|
PDAX2MDAG.GrepCallback(String word)
Overloaded Constructor. |
|
| Method Summary | |
|---|---|
int |
getCount()
Returns the number of words counted so far. |
void |
reset()
Resets the internal counters. |
void |
work(String line)
Callback whenever a line is read from the stream by the StreamGobbler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String mWord
private int mWordLength
private int mCount
| Constructor Detail |
|---|
public PDAX2MDAG.GrepCallback(String word)
word - the word to be searched for.| Method Detail |
|---|
public void work(String line)
work in interface StreamGobblerCallbackline - the line that is read.public int getCount()
public void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||