Package org.apache.commons.cli.help
Class HelpFormatter.Builder
- java.lang.Object
-
- org.apache.commons.cli.help.AbstractHelpFormatter.Builder<HelpFormatter.Builder,HelpFormatter>
-
- org.apache.commons.cli.help.HelpFormatter.Builder
-
- All Implemented Interfaces:
java.util.function.Supplier<HelpFormatter>
- Enclosing class:
- HelpFormatter
public static class HelpFormatter.Builder extends AbstractHelpFormatter.Builder<HelpFormatter.Builder,HelpFormatter>
A builder for the HelpFormatter. Intended to make more complex uses of the HelpFormatter class easier. Default values are:- showSince = true
- helpAppendable = a
TextHelpAppendablewriting toSystem.out - optionFormatter.Builder = the default
OptionFormatter.Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()Constructs a new instace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HelpFormatterget()HelpFormatter.BuildersetShowSince(boolean showSince)Sets the showSince flag.-
Methods inherited from class org.apache.commons.cli.help.AbstractHelpFormatter.Builder
asThis, getComparator, getHelpAppendable, getOptionFormatBuilder, getOptionGroupSeparator, setComparator, setHelpAppendable, setOptionFormatBuilder, setOptionGroupSeparator
-
-
-
-
Constructor Detail
-
Builder
protected Builder()
Constructs a new instace.Sets
showSincetotrue.
-
-
Method Detail
-
get
public HelpFormatter get()
-
setShowSince
public HelpFormatter.Builder setShowSince(boolean showSince)
Sets the showSince flag.- Parameters:
showSince- the desired value of the showSince flag.- Returns:
- this instance.
-
-