Top Description Fields Constructors Methods
com.beust.jcommander.converters

public Class DefaultListConverter<T>

extends Object
implements IStringConverter<List<T>>
Class Inheritance
All Implemented Interfaces
com.beust.jcommander.IStringConverter
Type Parameters
<T>
the element type
Imports
com.beust.jcommander.IStringConverter, com.beust.jcommander.internal.Lists, java.util.List

A converter to obtain a list of elements.
Author
simon04

Field Summary

Modifier and TypeField and Description
private final IStringConverter<T>
private final IParameterSplitter

Constructor Summary

AccessConstructor and Description
public
DefaultListConverter(IParameterSplitter
to split value into list of arguments
splitter
,
IStringConverter<T>
to convert list of arguments to target element type
converter
)

Constructs a new converter.

Method Summary

Modifier and TypeMethod and Description
public List<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

converterback to summary
private final IStringConverter<T> converter
splitterback to summary
private final IParameterSplitter splitter

Constructor Detail

DefaultListConverterback to summary
public DefaultListConverter(IParameterSplitter splitter, IStringConverter<T> converter)

Constructs a new converter.

Parameters
splitter:IParameterSplitter

to split value into list of arguments

converter:IStringConverter<T>

to convert list of arguments to target element type

Method Detail

convertback to summary
public List<T> convert(String value)

Implements com.beust.jcommander.IStringConverter.convert.

Returns:List<T>

Doc from com.beust.jcommander.IStringConverter.convert.

an object of type T created from the parameter value.

Annotations
@Override