docs: public void printUsage(PrintWriter pw, int width, String app, Options options)
      {
          // initialise the string buffer
          StringBuffer buff = new StringBuffer(getSyntaxPrefix()).append(app).append(" ");
  
          // create a list for processed option groups
          Collection<OptionGroup> processedGroups = new ArrayList<OptionGroup>();
  
          List<Option> optList = new ArrayList<Option>(options.getOptions());
          if (getOptionComparator() != null)
          {
              Collections.sort(optList, getOptionComparator());
          }
          // iterate over the options
          for (Iterator<Option> it = optList.iterator(); it.hasNext();)
          {
              // get the next Option
              Option option = it.next();
  
              // check if the option is part of an OptionGroup
              OptionGroup group = options.getOptionGroup(option);
  
              // if the option is part of a group 
              if (group != null)
              {
                  // and if the group has not already been processed
                  if (!processedGroups.contains(group))
                  {
                      // add the group to the processed list
                      processedGroups.add(group);
  
  
                      // add the usage clause
                      appendOptionGroup(buff, group);
                  }
  
                  // otherwise the option was displayed in the group
                  // previously so ignore it.
              }
  
              // if the Option is not part of an OptionGroup
              else
              {
                  appendOption(buff, option, option.isRequired());
              }
  
              if (it.hasNext())
              {
                  buff.append(" ");
              }
          }
  
  
          // call printWrapped
          printWrapped(pw, width, buff.toString().indexOf(' ') + 1, buff.toString());
      }