C - collection type parameterE - element type parameterpublic abstract class StringCollectionAdapter<C extends Collection<E>,E> extends XmlAdapter<String,C>
| Modifier and Type | Field and Description |
|---|---|
protected String |
delimiter
the delimiter.
|
| Constructor and Description |
|---|
StringCollectionAdapter(String delimiter)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected Appendable |
appendable(C bound)
Returns an appendable.
|
protected abstract C |
bound(String value)
Returns a collection for given concatenated string
|
protected abstract E |
element(String token)
Parses given token to desired element.
|
String |
marshal(C bound) |
protected String |
string(Appendable appendable)
Prints given appendable.
|
protected abstract String |
token(E element)
Prints given element.
|
C |
unmarshal(String value) |
protected final String delimiter
public StringCollectionAdapter(String delimiter)
delimiter - the delimiterpublic C unmarshal(String value) throws Exception
unmarshal in class XmlAdapter<String,C extends Collection<E>>Exceptionprotected abstract C bound(String value)
value - the concatenated stringprotected abstract E element(String token)
token - the tokenpublic String marshal(C bound) throws Exception
marshal in class XmlAdapter<String,C extends Collection<E>>Exceptionprotected Appendable appendable(C bound)
bound - the boundprotected abstract String token(E element)
element - the elementprotected String string(Appendable appendable)
appendable - the appendableCopyright © 2011-2013. All Rights Reserved.