|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.swabunga.spell.event.AbstractWordFinder
com.swabunga.spell.event.TeXWordFinder
public class TeXWordFinder
A word finder for TeX and LaTeX documents, which searches text for sequences of letters, but ignores any commands and environments as well as Math environments.
Field Summary | |
---|---|
static int |
REG_EXPR
A type where regular expressions are used to define expression to ignore |
static int |
STRING_EXPR
A type where string expressions are used to define expression to ignore |
Fields inherited from class com.swabunga.spell.event.AbstractWordFinder |
---|
currentWord, nextWord, sentenceIterator, startsSentence, text |
Constructor Summary | |
---|---|
TeXWordFinder()
Creates a new DefaultWordFinder object. |
|
TeXWordFinder(java.lang.String inText)
Creates a new DefaultWordFinder object. |
Method Summary | |
---|---|
void |
addUserDefinedIgnores(java.util.Collection expressions,
int regex)
This method is used to import a user defined set of either strings or regular expressions to ignore. |
Word |
next()
This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word. |
void |
setIgnoreComments(boolean ignore)
Define if comments contents are ignored during spell checking |
Methods inherited from class com.swabunga.spell.event.AbstractWordFinder |
---|
current, getText, hasNext, ignore, ignore, ignore, ignore, init, isWordChar, isWordChar, replace, setSentenceIterator, setText, startsSentence, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int STRING_EXPR
public static final int REG_EXPR
Constructor Detail |
---|
public TeXWordFinder(java.lang.String inText)
inText
- the text to search.public TeXWordFinder()
Method Detail |
---|
public Word next()
next
in interface WordFinder
next
in class AbstractWordFinder
WordNotFoundException
- search string contains no more words.public void addUserDefinedIgnores(java.util.Collection expressions, int regex)
expressions
- a collection of Objects whose toString() value should be the expression. Typically String objects.regex
- is an integer specifying the type of expression to use. e.g. REG_EXPR, STRING_EXPR.public void setIgnoreComments(boolean ignore)
ignore
- an indication if comments content is to be ignored
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |