Class AbstractConsoleArgument

    • Constructor Detail

      • AbstractConsoleArgument

        public AbstractConsoleArgument()
      • AbstractConsoleArgument

        public AbstractConsoleArgument​(String... flags)
      • AbstractConsoleArgument

        public AbstractConsoleArgument​(int requiredArgs,
                                       String... flags)
    • Method Detail

      • isFlag

        protected boolean isFlag​(LinkedList<String> args)
        Check if the given list of arguments starts with a flag that matches this ConsoleArgument.
        Returns:
        true iff one of this argument's flags matches the first string in the given list, or this argument has no explicit flags.
      • getParam

        protected String getParam​(LinkedList<String> args)
        If the next argument is an appropriate parameter to a ConsoleArgument, retrieves it; otherwise, returns null.
        Returns:
        The first argument of the given list, if it does not start with a '-' character; or null otherwise.