private void _appendOptionGroup ( final StringBuilder aSB , final OptionGroup aGroup ) { if ( ! aGroup . isRequired ( ) ) aSB . append ( ' ' ) ; final ICommonsList < Option > optList = aGroup . getAllOptions ( ) ; if ( m_aOptionComparator != null ) optList . sort ( m_aOptionComparator ) ; // for each option in the OptionGroup final Iterator < Option > it = optList . iterator ( ) ; while ( it . hasNext ( ) ) { // whether the option is required or not is handled at group level _appendOption ( aSB , it . next ( ) , true ) ; if ( it . hasNext ( ) ) aSB . append ( " | " ) ; } if ( ! aGroup . isRequired ( ) ) aSB . append ( ' ' ) ; }
Appends the usage clause for an OptionGroup to a StringBuilder . The clause is wrapped in square brackets if the group is required . The display of the options is handled by appendOption