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("]");
  }
}

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 ( "]" ) ; } }
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
