private class PDAX2MDAG.GrepCallback extends Object implements StreamGobblerCallback
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
GrepCallback(String word)
Overloaded Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
private String mWord
private int mWordLength
private int mCount
public GrepCallback(String word)
word
- the word to be searched for.public void work(String line)
work
in interface StreamGobblerCallback
line
- the line that is read.public int getCount()
public void reset()