Class Arguments

java.lang.Object
com.github.basking2.sdsai.itrex.util.Arguments

public class Arguments extends Object
Some utility functions for parsing arguments out of an iterator. This is useful in collecting arguments to functions.
  • Constructor Details

    • Arguments

      public Arguments()
  • Method Details

    • parseArgs

      public static Map<String,String> parseArgs(Iterator<?> args, String separator)
      Consume all argument values and parse them into a Map. This will split(args, 2) all arguments to form a name-value pair. The value is put into the hash that is returned.
      Parameters:
      args - The iterator of name-value pairs.
      separator - The string that separates names (the left) from the values (the right).
      Returns:
      A map of all names to values parsed out.