code: public List<String> parse(String[] args, int pos) {
      List<String> parameters = new ArrayList<String>();
      for(; pos < args.length; pos++) {
        if (args[pos].charAt(0) == '-' && args[pos].length() > 1) {
          String opt = args[pos].substring(1);
          if (options.containsKey(opt))
            options.put(opt, Boolean.TRUE);
          else {
            try {
              Long.parseLong(args[pos]);
              parameters.add(args[pos]);
            } catch (NumberFormatException e) {
              throw new IllegalArgumentException("Illegal option " + args[pos]);
            }
          }
        }
        else
          parameters.add(args[pos]);
      }
      int psize = parameters.size();
      if (psize < minPar || psize > maxPar)
        throw new IllegalArgumentException("Illegal number of arguments");
      return parameters;
    }
docs: Parse parameters starting from the given position
  
  @param args an array of input arguments
  @param pos the position at which starts to parse
  @return a list of parameters