code: public static Map<String, String[]> argsToMap(String[] args) {
      return argsToMap(args, new HashMap<String, Integer>());
    }
docs: Parses command line arguments into a Map. Arguments of the form
  <p/>
  -flag1 arg1a arg1b ... arg1m -flag2 -flag3 arg3a ... arg3n
  <p/>
  will be parsed so that the flag is a key in the Map (including
  the hyphen) and its value will be a {@link String}[] containing
  the optional arguments (if present).  The non-flag values not
  captured as flag arguments are collected into a String[] array
  and returned as the value of <code>null</code> in the Map.  In
  this invocation, flags cannot take arguments, so all the {@link
  String} array values other than the value for <code>null</code>
  will be zero-length.
  
  @param args A command-line arguments array
  @return a {@link Map} of flag names to flag argument {@link
  String} arrays.