Package berlin.yuna.clu.logic
Class CommandLineReader
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.List<java.lang.String>>
-
- berlin.yuna.clu.logic.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>
-
-
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 getjava.lang.StringgetCommand()get commandjava.lang.StringgetCommand(int index)get commandjava.lang.StringgetValue(int index, java.lang.String... keys)IgnoreCase getValuejava.lang.StringgetValue(java.lang.String... keys)IgnoreCase getValuejava.util.List<java.lang.String>getValues(java.lang.String... keys)IgnoreCase getValuebooleanisPresent(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
-
-
-
-
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 forindex- 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
-
-