private static class SpellTestCmdLine.TextRipper
extends Object
implements Iterator
Modifier and Type | Field and Description |
---|---|
(package private) Stack |
fileStack |
(package private) String |
line |
(package private) boolean |
more |
(package private) BufferedReader |
reader |
(package private) Pattern |
wordPat
Pattern for matching words
|
(package private) Matcher |
words |
(package private) Pattern |
xmlPat
Pattern for matching XML and HTML elements
|
Constructor and Description |
---|
TextRipper(String dir) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
advance()
Advance to the next word in the current file, or the next file if at the
end of the current one.
|
boolean |
hasNext()
Check if there's another word to get
|
Object |
next()
Get the next word in the sequence
|
(package private) boolean |
nextFile()
Scan to the next file in the sequence, and open it.
|
void |
remove()
Not implemented
|
(package private) String |
stripXML(String line)
Try to strip XML and HTML elements from a line
|
Stack fileStack
BufferedReader reader
boolean more
String line
Matcher words
Pattern wordPat
final Pattern xmlPat
boolean nextFile() throws IOException
IOException
void advance() throws IOException
IOException
String stripXML(String line)
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator