Top Fields Constructors Methods
org.xnio

pack-priv final Class SequenceOption<T>

extends Option<Sequence<T>>
Class Inheritance
Imports
java.util.ArrayList, .Collection, .List

Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final transient Class<T>
private final transient Option.ValueParser<T>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
SequenceOption(final Class<?> declClass, final String name, final Class<T> elementType)

Method Summary

Modifier and TypeMethod and Description
public Sequence<T>
cast(final Object
the object to cast
o
)

Implements abstract org.xnio.Option.cast.

Return the given object as the type of this option.

public Sequence<T>
parseValue(final String
the string
string
,
final ClassLoader
the class loader to use to parse the value
classLoader
)

Implements abstract org.xnio.Option.parseValue.

Parse a string value for this option.

Inherited from org.xnio.Option:
castfromStringgetClassParsergetEnumParsergetNamegetParserreadResolvesequencesetBuildersimpletoStringtypetypeSequence

Field Detail

elementTypeback to summary
private final transient Class<T> elementType
parserback to summary
private final transient Option.ValueParser<T> parser
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.xnio.Option.serialVersionUID.

Constructor Detail

SequenceOptionback to summary
pack-priv SequenceOption(final Class<?> declClass, final String name, final Class<T> elementType)

Method Detail

castback to summary
public Sequence<T> cast(final Object o)

Implements abstract org.xnio.Option.cast.

Doc from org.xnio.Option.cast.

Return the given object as the type of this option. If the cast could not be completed, an exception is thrown.

Parameters
o:Object

the object to cast

Returns:Sequence<T>

the cast object

parseValueback to summary
public Sequence<T> parseValue(final String string, final ClassLoader classLoader) throws IllegalArgumentException

Implements abstract org.xnio.Option.parseValue.

Doc from org.xnio.Option.parseValue.

Parse a string value for this option.

Parameters
string:String

the string

classLoader:ClassLoader

the class loader to use to parse the value

Returns:Sequence<T>

the parsed value

Exceptions
IllegalArgumentException:
if the argument could not be parsed