Package berlin.yuna.clu.logic
Class CommandLineReader
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<String,List<String>>
-
- berlin.yuna.clu.logic.CommandLineReader
-
- All Implemented Interfaces:
Serializable,ConcurrentMap<String,List<String>>,Map<String,List<String>>
public class CommandLineReader extends ConcurrentHashMap<String,List<String>>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description CommandLineReader(String... input)Parses a string arguments into key value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>get(String key)IgnoreCase getStringgetCommand()get commandStringgetCommand(int index)get commandStringgetValue(int index, String... keys)IgnoreCase getValueStringgetValue(String... keys)IgnoreCase getValueList<String>getValues(String... keys)IgnoreCase getValuebooleanisPresent(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
-
-
-
-
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 forindex- 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
-
-