code: public static SettingsPort get(Map<String, String[]> clArgs)
      {
          String[] params = clArgs.remove("-port");
          if (params == null)
          {
              return new SettingsPort(new PortOptions());
          }
          PortOptions options = GroupedOptions.select(params, new PortOptions());
          if (options == null)
          {
              printHelp();
              System.out.println("Invalid -port options provided, see output for valid options");
              System.exit(1);
          }
          return new SettingsPort(options);
      }
docs: CLI Utility Methods