@@ -183,6 +183,7 @@ public B setOptionGroupSeparator(final String optionGroupSeparator) {
183183 * The {@link HelpAppendable} that produces the final output.
184184 */
185185 protected final HelpAppendable helpAppendable ;
186+
186187 /**
187188 * The OptionFormatter.Builder used to display options within the help page
188189 */
@@ -199,17 +200,13 @@ public B setOptionGroupSeparator(final String optionGroupSeparator) {
199200 /**
200201 * Constructs the base formatter.
201202 *
202- * @param helpAppendable the helpAppendable to output with
203- * @param optionFormatBuilder the builder of {@link OptionFormatter} to format options for display.
204- * @param comparator The comparator to use for sorting options.
205- * @param optionGroupSeparator the string to separate option groups.
203+ * @param builder the builder
206204 */
207- protected AbstractHelpFormatter (final HelpAppendable helpAppendable , final OptionFormatter .Builder optionFormatBuilder , final Comparator <Option > comparator ,
208- final String optionGroupSeparator ) {
209- this .helpAppendable = Objects .requireNonNull (helpAppendable , "helpAppendable" );
210- this .optionFormatBuilder = Objects .requireNonNull (optionFormatBuilder , "optionFormatBuilder" );
211- this .comparator = Objects .requireNonNull (comparator , "comparator" );
212- this .optionGroupSeparator = Util .defaultValue (optionGroupSeparator , "" );
205+ protected AbstractHelpFormatter (final Builder <?, ?> builder ) {
206+ this .helpAppendable = Objects .requireNonNull (builder .getHelpAppendable (), "helpAppendable" );
207+ this .optionFormatBuilder = Objects .requireNonNull (builder .getOptionFormatBuilder (), "optionFormatBuilder" );
208+ this .comparator = Objects .requireNonNull (builder .getComparator (), "comparator" );
209+ this .optionGroupSeparator = Util .defaultValue (builder .getOptionGroupSeparator (), "" );
213210 }
214211
215212 /**
0 commit comments