/** * <p>Adds rows of help output for the given options.</p> * * <p>This implementation:</p> * <ul> * <li>Calls {@link #addNonOptionsDescription(java.util.Collection)} with the options as the argument</li> * <li>If there are no options, calls {@link #addOptionRow(String)} with an argument that indicates * that no options are specified.</li> * <li>Otherwise, calls {@link #addHeaders(java.util.Collection)} with the options as the argument, * followed by {@link #addOptions(java.util.Collection)} with the options as the argument.</li> * <li>Calls {@link #fitRowsToWidth()}.</li> * </ul> * * @param options descriptors for the configured options of a parser */ protected void addRows( Collection<? extends OptionDescriptor> options ) { addNonOptionsDescription( options ); if ( options.isEmpty() ) addOptionRow( message( "no.options.specified" ) ); else { addHeaders( options ); addOptions( options ); } fitRowsToWidth(); }
/** * <p>Adds rows of help output for the given options.</p> * * <p>This implementation:</p> * <ul> * <li>Calls {@link #addNonOptionsDescription(java.util.Collection)} with the options as the argument</li> * <li>If there are no options, calls {@link #addOptionRow(String)} with an argument that indicates * that no options are specified.</li> * <li>Otherwise, calls {@link #addHeaders(java.util.Collection)} with the options as the argument, * followed by {@link #addOptions(java.util.Collection)} with the options as the argument.</li> * <li>Calls {@link #fitRowsToWidth()}.</li> * </ul> * * @param options descriptors for the configured options of a parser */ protected void addRows( Collection<? extends OptionDescriptor> options ) { addNonOptionsDescription( options ); if ( options.isEmpty() ) addOptionRow( message( "no.options.specified" ) ); else { addHeaders( options ); addOptions( options ); } fitRowsToWidth(); }