- java.lang.Object
-
- io.github.mmm.nls.cli.property.AbstractCliProperty<Boolean>
-
- io.github.mmm.nls.cli.property.CliBooleanProperty
-
- io.github.mmm.nls.cli.property.CliFlagProperty
-
- All Implemented Interfaces:
CliProperty<Boolean>
public class CliFlagProperty extends CliBooleanProperty
CliBooleanPropertyfor aCliOptiontreated as flag so that it does not require a value andtrueis used as value if the option is given without value.
-
-
Constructor Summary
Constructors Constructor Description CliFlagProperty(Localizable help, boolean mandatory, String... names)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEmpty()-
Methods inherited from class io.github.mmm.nls.cli.property.CliBooleanProperty
get, getValueClass, set, 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
-
CliFlagProperty
public CliFlagProperty(Localizable help, boolean mandatory, String... names)
The constructor.- Parameters:
help- thehelp message.mandatory- themandatoryflag.names- thenames.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Returns:
trueif thevalueof this property is empty (e.g.null),falseotherwise.
-
-