Class CommandLineReader

  • All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.ConcurrentMap<java.lang.String,​java.util.List<java.lang.String>>, java.util.Map<java.lang.String,​java.util.List<java.lang.String>>

    public class CommandLineReader
    extends java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.util.List<java.lang.String>>
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap

        java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandLineReader​(java.lang.String... input)
      Parses a string arguments into key value
    • Method Summary

      Modifier and Type Method Description
      java.util.List<java.lang.String> get​(java.lang.String key)
      IgnoreCase get
      java.lang.String getCommand()
      get command
      java.lang.String getCommand​(int index)
      get command
      java.lang.String getValue​(int index, java.lang.String... keys)
      IgnoreCase getValue
      java.lang.String getValue​(java.lang.String... keys)
      IgnoreCase getValue
      java.util.List<java.lang.String> getValues​(java.lang.String... keys)
      IgnoreCase getValue
      boolean isPresent​(java.lang.String key)
      IgnoreCase isPresent
      • Methods inherited from class java.util.concurrent.ConcurrentHashMap

        clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
      • Methods inherited from class java.util.AbstractMap

        clone
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CommandLineReader

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

      • getCommand

        public java.lang.String getCommand()
        get command
        Returns:
        command
      • getCommand

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

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

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

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

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

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