java.lang.Object
org.jhotdraw8.xml.converter.ListXmlConverter<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Converter<ImmutableList<T>>
Parses a set with items separated by configurable delimiters.
References:
- HTML 5, Common Microsyntaxes, Space-separated tokens
- w3.org
-
Constructor Summary
ConstructorsConstructorDescriptionListXmlConverter(Converter<T> elementConverter) Creates a new instance with a space character " " as the delimiter.ListXmlConverter(Converter<T> elementConverter, @Nullable String delimiter) ListXmlConverter(Converter<T> elementConverter, @Nullable String delimiter, @Nullable String prefix, @Nullable String suffix, @Nullable Comparator<T> comparatorForSorting) -
Method Summary
Modifier and TypeMethodDescription@Nullable ImmutableList<T> fromString(CharBuffer in, @Nullable IdResolver idResolver) @Nullable ImmutableList<T> boolean<TT extends ImmutableList<T>>
voidtoString(Appendable out, @Nullable IdSupplier idSupplier, @Nullable TT value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.base.converter.Converter
fromString, fromString, fromString, fromStringNonNull, fromStringNonNull, fromStringNonNull, fromStringNonNull, getHelpText, toString, toString, toString
-
Constructor Details
-
ListXmlConverter
Creates a new instance with a space character " " as the delimiter.- Parameters:
elementConverter- the element converter
-
ListXmlConverter
-
ListXmlConverter
-
-
Method Details
-
needsIdResolver
public boolean needsIdResolver()- Specified by:
needsIdResolverin interfaceConverter<T>
-
fromString
public @Nullable ImmutableList<T> fromString(CharBuffer in, @Nullable IdResolver idResolver) throws ParseException - Specified by:
fromStringin interfaceConverter<T>- Throws:
ParseException
-
toString
public <TT extends ImmutableList<T>> void toString(Appendable out, @Nullable IdSupplier idSupplier, @Nullable TT value) throws IOException - Specified by:
toStringin interfaceConverter<T>- Throws:
IOException
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceConverter<T>
-