Class CommandLineReader

    • Constructor Detail

      • CommandLineReader

        public CommandLineReader​(String... input)
        Parses a string arguments into key value
        Parameters:
        input - strings with arguments
    • Method Detail

      • getCommand

        public String getCommand()
        get command
        Returns:
        command
      • getCommand

        public String getCommand​(int index)
        get command
        Parameters:
        index - number of command
        Returns:
        command or null if no command were found
      • isPresent

        public boolean isPresent​(String key)
        IgnoreCase isPresent
        Parameters:
        key - search for
        Returns:
        true if key is present
      • getValue

        public String getValue​(String... keys)
        IgnoreCase getValue
        Parameters:
        keys - search for
        Returns:
        value or null if no value was found
      • getValue

        public String getValue​(int index,
                               String... keys)
        IgnoreCase getValue
        Parameters:
        keys - search for
        index - number of value
        Returns:
        value or null if no value was found
      • getValues

        public List<String> getValues​(String... keys)
        IgnoreCase getValue
        Parameters:
        keys - search for
        Returns:
        list of values
      • get

        public List<String> get​(String key)
        IgnoreCase get
        Parameters:
        key - search for
        Returns:
        list of values or empty list if not found