public class CollectionsSupport extends Object
| Constructor and Description |
|---|
CollectionsSupport() |
| Modifier and Type | Method and Description |
|---|---|
static void |
printMap(Map<?,?> map)
Print all key-value pairs of a map to the log at debug level
|
static List<String> |
splitStringToList(String str,
String delimiter)
Split a String to a List, based on the given delimiter
|
static List<String> |
splitStringToList(String str,
String delimiter,
boolean chomp)
Split a String to a List, based on the given delimiter, and also chomp any new lines that may be present.
|
static Map<String,String> |
splitStringToMap(String str,
String setDelimiter,
String kvDelimiter)
Split a String to a Map, based on the given delimiters, one for the sets and one for each pair
|
static Map<String,String> |
splitStringToMap(String str,
String setDelimiter,
String kvDelimiter,
boolean chomp)
Split a String to a Map, based on the given delimiters, one for the sets and one for each pair.
|
public static void printMap(Map<?,?> map)
map - public static List<String> splitStringToList(String str, String delimiter)
str - the stringdelimiter - delimiter to split onpublic static List<String> splitStringToList(String str, String delimiter, boolean chomp)
str - the stringdelimiter - delimiter to split onchomp - remove new lines as well?public static Map<String,String> splitStringToMap(String str, String setDelimiter, String kvDelimiter)
str - setDelimiter - the delimiter between each set of itemskvDelimiter - the delimiter between each item in a pairpublic static Map<String,String> splitStringToMap(String str, String setDelimiter, String kvDelimiter, boolean chomp)
str - setDelimiter - the delimiter between each set of itemskvDelimiter - the delimiter between each item in a pairchomp - whether or not to chomp new lines that may separate each pairCopyright © 2010–2023 Division of Information, Australian National University. All rights reserved.