public class CommandUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
CONFIGURATION_PATTERN |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArguments(Object... params)
Checks arguments and throws exception if there is an issue
|
static String[] |
keyValuesToArray(List<String> o) |
static Map<String,Object> |
stringToMap(@NotNull String input,
UnaryOperator<String> valueTransformer) |
static String |
trimQuotes(@NotNull String quotedString) |
static void |
writeToMap(Map<String,Object> map,
boolean embed,
Object... params)
write key/value pairs into a map
|
public static final Pattern CONFIGURATION_PATTERN
public static void checkArguments(Object... params)
params - arguments to checkIllegalArgumentException - exception thrown in case arguments are wrongpublic static void writeToMap(Map<String,Object> map, boolean embed, Object... params)
map - target mapembed - flag indicating wether or not we should try to embed values in script tags,params - key/value pairs to write into the mappublic static Map<String,Object> stringToMap(@NotNull @NotNull String input, UnaryOperator<String> valueTransformer)
input - comma separated key=value pairsvalueTransformer - before adding it to the map, that function will be applied to found valuepublic static String trimQuotes(@NotNull @NotNull String quotedString)
quotedString - non null string with or without quotes", strip them away, otherwise return same stringCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.