de.spieleck.app.jacson.select
Class WordSelect
java.lang.Object
de.spieleck.app.jacson.select.WordSelect
- All Implemented Interfaces:
- ConfigVerify.Acceptor, JacsonRegistrable, JacsonSelect
- public class WordSelect
- extends java.lang.Object
- implements JacsonSelect, ConfigVerify.Acceptor
Selects every word out of a chunk and returns them as chunks. To separate
the words delimiters are used in a "StringTokenizer-way".
(@see java.util.StringTokenizer). The delimiters themselves are not returned
as words.
- Author:
- Patrick Carl, fsn
Constructor Summary |
WordSelect()
Creates a new instance of WordSelect |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELIMS_NODE
public static final java.lang.String DELIMS_NODE
- See Also:
- Constant Field Values
DEFAULT_DELIM
public static final java.lang.String DEFAULT_DELIM
- See Also:
- Constant Field Values
delims
protected java.lang.String delims
currentChunk
protected java.lang.String currentChunk
lastMatch
protected int lastMatch
length
protected int length
result
protected SimpleResult result
WordSelect
public WordSelect()
- Creates a new instance of WordSelect
getNextSelection
public SelectionResult getNextSelection()
- A word is delimited by one or multiple of the given delimiter
characters or by the beginning and the end of the chunk
- Specified by:
getNextSelection
in interface JacsonSelect
- Returns:
- the next word of the chunk in a SelectionResult.
init
public void init(ConfigNode node,
JacsonRegistry registry)
throws JacsonConfigException
- Specified by:
init
in interface JacsonRegistrable
- Throws:
JacsonConfigException
setDelims
public void setDelims(java.lang.String delimsString)
- inits the delimiters to be used
setChunk
public void setChunk(java.lang.String chunk)
- Specified by:
setChunk
in interface JacsonSelect
accept
public boolean accept(ConfigNode node)
- Specified by:
accept
in interface ConfigVerify.Acceptor
Copyleft 2002 spieleck.de.