|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dsrg.sofa.deployment.zeroconf.ListParser<T>
public class ListParser<T>
ValueParser
that parses a string into an array of strings
and applies another ValueParser
on each string.
Format of the input string
The input string is a white-space delimited list of strings.
If you need to input white-space inside the string, you can
Example:
aaa bb\ bb ( c c ) dd)\(dd (e( \)e)
is a list of five strings: "aaa", "bb bb",
" c c ", "dd)(dd", "e( )e".
Note that if the values for this ValueParser
are to be
specified in a configuration file, after applying these encoding rules
you need to do any escaping of special characters required by Properties
, see Properties.load(java.io.Reader)
.
Field Summary | |
---|---|
static java.lang.String |
DELIMITERS
String containing all delimiter characters. |
static char |
ESC_CHAR
Escape character. |
static char |
GRP_END
End-of-the-group character. |
static char |
GRP_START
Start-of-the-group character. |
Constructor Summary | |
---|---|
ListParser(ValueParser<T> itemParser)
|
Method Summary | |
---|---|
java.util.List<T> |
parse(java.lang.String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DELIMITERS
public static final char ESC_CHAR
public static final char GRP_START
public static final char GRP_END
Constructor Detail |
---|
public ListParser(ValueParser<T> itemParser)
Method Detail |
---|
public java.util.List<T> parse(java.lang.String str) throws ParseException
parse
in interface ValueParser<java.util.List<T>>
str
- String to be parsed.
ParseException
- if s
is malformed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |