- java.lang.Object
-
- io.github.mmm.nls.cli.property.AbstractCliProperty<String>
-
- io.github.mmm.nls.cli.property.CliStringProperty
-
- All Implemented Interfaces:
CliProperty<String>
public class CliStringProperty extends AbstractCliProperty<String>
Implementation ofCliPropertyforString.
-
-
Constructor Summary
Constructors Constructor Description CliStringProperty(Localizable help, boolean mandatory, String... names)The constructor.CliStringProperty(Localizable help, String defaultValue, String... names)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget()Class<String>getValueClass()booleanisEmpty()voidset(String value)voidsetFromString(String value)-
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
-
CliStringProperty
public CliStringProperty(Localizable help, boolean mandatory, String... names)
The constructor.- Parameters:
help- thehelp message.mandatory- themandatoryflag.names- thenames.
-
CliStringProperty
public CliStringProperty(Localizable help, String defaultValue, String... names)
The constructor.- Parameters:
help- thehelp message.defaultValue- the initial defaultvalue.names- thenames.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Returns:
trueif thevalueof this property is empty (e.g.null),falseotherwise.
-
get
public String get()
- Returns:
- the current value.
-
set
public void set(String value)
- Parameters:
value- the new value.
-
-