- 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 ofCliProperty
forString
.
-
-
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 String
get()
Class<String>
getValueClass()
boolean
isEmpty()
void
set(String value)
void
setFromString(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
- themandatory
flag.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:
true
if thevalue
of this property is empty (e.g.null
),false
otherwise.
-
get
public String get()
- Returns:
- the current value.
-
set
public void set(String value)
- Parameters:
value
- the new value.
-
-