Class CLIMapParser

java.lang.Object
com.articulate.sigma.CLIMapParser

public class CLIMapParser extends Object
A simple command-line argument parser that handles options in any order and returns them as a map.
  • Constructor Details

    • CLIMapParser

      public CLIMapParser()
  • Method Details

    • parse

      public static Map<String,List<String>> parse(String[] args)
      Parses the command-line arguments into a Map. Options should start with '-' or '--'. Only double dash options can have arguments Single dash options can be combined, as in -xvf
      Parameters:
      args - The array of command-line arguments.
      Returns:
      A Map of options (keys) and their values.
    • main

      public static void main(String[] args)
      Main method to demonstrate the parser's usage.