@ProviderType public class ParameterUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
toMap(String[] values,
String separator)
Util for parsing Arrays of Service properties in the form >value<>separator<>value<
If a value is missing from a key/value pair, the entry is rejected.
|
static Map<String,String> |
toMap(String[] values,
String separator,
boolean allowValuelessKeys,
String defaultValue)
Util for parsing Arrays of Service properties in the form >value<>separator<>value<
If a value is missing from a key/value pair, the entry is rejected only if allowValuelessKyes is false.
|
static Map<String,String> |
toMap(String[] values,
String separator,
boolean allowValuelessKeys,
String defaultValue,
boolean allowMultipleSeparators)
Util for parsing Arrays of Service properties in the form >value<>separator<>value<
If a value is missing from a key/value pair, the entry is rejected only if allowValuelessKyes is false.
|
static Map<String,String[]> |
toMap(String[] values,
String mapSeparator,
String listSeparator)
Util for parsing Arrays of Service properties in the form >value<>map-separator<>value>list-separator<>value<<
|
static Map<String,String[]> |
toMap(String[] values,
String mapSeparator,
String listSeparator,
boolean allowValuelessKeys,
String defaultValue)
Util for parsing Arrays of Service properties in the form >value<>map-separator<>value>list-separator<>value<<
|
static Map.Entry<String,String> |
toMapEntry(String value,
String separator)
Util for parsing Service properties in the form
<value><separator><value> |
static Map.Entry<String,String> |
toMapEntryWithOptionalValue(String value,
String separator)
Util for parsing Service properties in the form
<value><separator><value> |
static List<Pattern> |
toPatterns(String[] values)
Util for converting a String[] into a List of compiled Patterns.
|
public static Map.Entry<String,String> toMapEntryWithOptionalValue(String value, String separator)
<value><separator><value>value - must be in the format => x<separator>y ... ex. foo:barseparator - separator between the valuesMap.Entry representing the key/value pair. The entry's value may be null in case no separator is found.public static Map.Entry<String,String> toMapEntry(String value, String separator)
<value><separator><value>value - must be in the format => x<separator>y ... ex. foo:barseparator - separator between the valuesMap.Entry representing the key/value pair. It may be null in case no separator is found.public static Map<String,String> toMap(String[] values, String separator)
values - Array of key/value pairs in the format => [ aseparator - separator between the valuespublic static Map<String,String> toMap(String[] values, String separator, boolean allowValuelessKeys, String defaultValue)
values - Array of key/value pairs in the format => [ aseparator - separator between the valuesallowValuelessKeys - true is keys are allowed without associated valuesdefaultValue - default value to use if a value for a key is not present and allowValuelessKeys is truepublic static Map<String,String> toMap(String[] values, String separator, boolean allowValuelessKeys, String defaultValue, boolean allowMultipleSeparators)
values - Array of key/value pairs in the format => [ aseparator - separator between the valuesallowValuelessKeys - true is keys are allowed without associated valuesdefaultValue - default value to use if a value for a key is not present and allowValuelessKeys is trueallowMultipleSeparators - if true, multiple separators are allowed per entry in which case only the first is considered.
If false, entries with multiple separators are considered invalidpublic static Map<String,String[]> toMap(String[] values, String mapSeparator, String listSeparator)
values - Array of key/value pairs in the format => [ a<map-separator>b, x<map-separator>y<list-separator>z ] ... ex. ["dog:woof", "cat:meow,purr"]mapSeparator - separator between the key/values in the amplistSeparator - separator between the values in each listpublic static Map<String,String[]> toMap(String[] values, String mapSeparator, String listSeparator, boolean allowValuelessKeys, String defaultValue)
values - Array of key/value pairs in the format => [ a<map-separator>b, x<map-separator>y<list-separator>z ] ... ex. ["dog:woof", "cat:meow,purr"]mapSeparator - separator between the key/values in the amplistSeparator - separator between the values in each listallowValuelessKeys - true is keys are allowed without associated valuesdefaultValue - default value to use if a value for a key is not present and allowValuelessKeys is true*Copyright © 2013–2020 Adobe. All rights reserved.