question: private void appendOptionGroup ( final StringBuffer buff , final OptionGroup group ) { if ( ! group . isRequired ( ) ) { buff . append ( "[" ) ; } List optList = new ArrayList ( group . getOptions ( ) ) ; Collections . sort ( optList , getOptionComparator ( ) ) ; for ( Iterator i = optList . iterator ( ) ; i . hasNext ( ) ; ) { appendOption ( buff , ( Option ) i . next ( ) , true ) ; if ( i . hasNext ( ) ) { buff . append ( " | " ) ; } } if ( ! group . isRequired ( ) ) { buff . append ( "]" ) ; } }
target:  Appends the usage clause for an OptionGroup to a StringBuffer.   The clause is wrapped in square brackets if the group is required. The display of the options is handled by appendOption