org.oddjob.values.types
Class TokenizerType
java.lang.Object
org.oddjob.values.types.TokenizerType
- All Implemented Interfaces:
- ArooaValue
public class TokenizerType
- extends Object
- implements ArooaValue
Description
Tokenizes text. This type provides conversion to an array
or list of strings.
The delimiter can be provided as either plain text or a regular expression.
The default delimiter is the regular expression \s*,\s*
which is
CSV with optional white space either side.
Example
Tokenize comma separated values.
java.io.IOException: No Resource found: org/oddjob/values/types/TokenizeExample.xml
- Author:
- rob
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEMENT
public static final ArooaElement ELEMENT
DEFAULT_DELIMITER_REGEXP
public static final String DEFAULT_DELIMITER_REGEXP
- See Also:
- Constant Field Values
TokenizerType
public TokenizerType()
parse
public String[] parse()
throws ParseException
- Throws:
ParseException
getDelimiter
public String getDelimiter()
setDelimiter
public void setDelimiter(String delimiter)
getRegexp
public String getRegexp()
setRegexp
public void setRegexp(String regexp)
getEscape
public Character getEscape()
setEscape
public void setEscape(Character escape)
getQuote
public Character getQuote()
setQuote
public void setQuote(Character quote)
getText
public String getText()
setText
public void setText(String text)