Skip to main content
Skip table of contents

FORMAT_FLAT_LIST_INDEX

Versionshinweise

24.1

Code

GROOVY
ScriptUtils.FORMAT_FLAT_LIST_INDEX

Beschreibung

Zeilenformat einer Liste, enthaltene Listen werden ebenfalls in einer Zeile dargestellt, jeder Listeneintrag erhält seinen Index vorangestellt.

Beispiele

GROOVY
List<Object> lists = new ArrayList<>();
lists.add("Value1");
lists.add(1);
lists.add(null);

Map<String, Object> map = new HashMap<>();
map.put("map1_param1", "mapVal1");
map.put("map1_param2", 2d);
map.put("map1_param3", null);
map.put("map1_param4", lists);

ScriptUtils.error("formatted Map flat list with index [" + ScriptUtils.formatAsString(map, ScriptUtils.FORMAT_FLAT_LIST_INDEX) + "]");

Ausgabe 
[ERROR] formatted Map flat list with index [
   map1_param2: 2.0
   map1_param1: mapVal1
   map1_param4: 0: Value1, 1: 1, 2: NULL value
   map1_param3: NULL value] 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.