Package generic.theme
Class ThemeValueUtils
java.lang.Object
generic.theme.ThemeValueUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseGroupings
(String source, char startChar, char endChar) Parses the given source string into a list of strings, one for each group.
-
Constructor Details
-
ThemeValueUtils
public ThemeValueUtils()
-
-
Method Details
-
parseGroupings
public static List<String> parseGroupings(String source, char startChar, char endChar) throws ParseException Parses the given source string into a list of strings, one for each group. The startChar and endChar defined the group characters. So, for example, "(ab (cd))(ef)((gh))" would result in a list with the following values: "ab (cd)", "ef", and "(gh)"- Parameters:
source
- the source string to parse into groupsstartChar
- the character that defines the start of a groupendChar
- the character that defines then end of a group- Returns:
- a List of strings, one for each consecutive group contained in the string
- Throws:
ParseException
- if the groupings are not balanced or missing altogether
-