- java.lang.Object
-
- io.github.mmm.nls.cli.property.AbstractCliProperty<C>
-
- io.github.mmm.nls.cli.property.CliCollectionProperty<E,List<E>>
-
- io.github.mmm.nls.cli.property.CliListProperty<E>
-
- All Implemented Interfaces:
CliProperty<List<E>>
- Direct Known Subclasses:
CliClassListProperty
,CliLocaleListProperty
,CliLongListProperty
,CliStringListProperty
public class CliListProperty<E> extends CliCollectionProperty<E,List<E>>
Implementation ofCliProperty
forList
.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description CliListProperty(Localizable help, CliProperty<E> property, boolean mandatory, String... names)
The constructor.CliListProperty(Localizable help, CliProperty<E> property, List<E> defaultValue, String... names)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(E item)
List<E>
get()
Class<List<E>>
getValueClass()
void
set(List<E> value)
-
Methods inherited from class io.github.mmm.nls.cli.property.CliCollectionProperty
addFromString, isEmpty, setFromString
-
Methods inherited from class io.github.mmm.nls.cli.property.AbstractCliProperty
getHelp, getNames, isMandatory, isOption, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.nls.cli.property.CliProperty
getAsString, getName, isValid, validate
-
-
-
-
Constructor Detail
-
CliListProperty
public CliListProperty(Localizable help, CliProperty<E> property, boolean mandatory, String... names)
The constructor.- Parameters:
help
- thehelp message
.property
- theCliProperty
for a single element (used as mapper to parse fromString
).mandatory
- themandatory
flag.names
- thenames
.
-
CliListProperty
public CliListProperty(Localizable help, CliProperty<E> property, List<E> defaultValue, String... names)
The constructor.- Parameters:
help
- thehelp message
.defaultValue
- the initial defaultvalue
.property
- theCliProperty
for a single element (used as mapper to parse fromString
).names
- thenames
.
-
-