public class MapTools extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map |
defineEntries(Map map,
List<String> declarations)
Define new entries in
map from all declaration strings in
declarations. |
static Map |
defineEntries(Map map,
String definition)
Define new entries in
map from declarations. |
static Object |
get(Map map,
Object key,
Object defaultValue) |
static String |
get(Map map,
Object key,
String defaultValue) |
static String |
toStringDeep(Map<String,?> map) |
static void |
toStringDeep(Map<String,?> map,
String prefix,
StringBuilder sb)
|
public static final String SEPARATOR
public static Map defineEntries(Map map, List<String> declarations)
map from all declaration strings in
declarations. For every string in the collection,
defineEntries(Map, String) is called.map - The map to receive the new declarationsdeclarations - A collection of declaration strings.mappublic static Map defineEntries(Map map, String definition)
map from declarations.
For the "declarations" syntax see ReaderTools.readEntry(java.io.Reader, char).map - The map to receive the new declarationsdeclarations - A collection of declaration strings.mappublic static void toStringDeep(Map<String,?> map, String prefix, StringBuilder sb)
Map to a String. This is done recursively,
i.e. all Map substructures are converted, too. The result is a
String where the keys are path names.
Example, .
{
a = "b"
x = {
i = 12
j = {
last = "nn"
}
}
}
will result in
a="b";x.i="12";x.j.last="nn"
map - Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.