Package coneforest.cli
Class OptionCollector<T>
- java.lang.Object
-
- coneforest.cli.Option
-
- coneforest.cli.OptionWithArg
-
- coneforest.cli.OptionCollector<T>
-
- Type Parameters:
T
- a type of containing object
- Direct Known Subclasses:
OptionCollectorDouble
,OptionCollectorFloat
,OptionCollectorInteger
,OptionCollectorLong
,OptionCollectorString
public abstract class OptionCollector<T> extends OptionWithArg
Base class representing an abstract option holding a list of objects.
-
-
Constructor Summary
Constructors Constructor Description OptionCollector(String names)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
getValue()
Returns a list containing collected objects.void
handle(String arg)
Add parsed argument to list.
-
-
-
Constructor Detail
-
OptionCollector
public OptionCollector(String names)
-
-
Method Detail
-
handle
public void handle(String arg) throws ProcessingException
Add parsed argument to list. Argument is parsed byparseArg(String)
.- Specified by:
handle
in classOptionWithArg
- Parameters:
arg
- an argument.- Throws:
ProcessingException
- when parse error occurs.
-
-