Package com.funnelback.common.utils
Class SharedConfigKeyUtils
- java.lang.Object
-
- com.funnelback.common.utils.SharedConfigKeyUtils
-
public class SharedConfigKeyUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description SharedConfigKeyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getKeyWithWildcard(String key, List<String> wildcards)
Substitutes the wildcards into the key.static void
validateKey(String pattern)
-
-
-
Method Detail
-
getKeyWithWildcard
public static String getKeyWithWildcard(String key, List<String> wildcards)
Substitutes the wildcards into the key. The key's wildcards are places where between dots is a single '*' e.g. foo.*.* is a key with two wildcards.- Parameters:
key
- key in wildcard form ie. foo.*.*wildcards
- list of wildcard values to replace in key ie. List.of("bar", "baz")- Returns:
- key with replaced wildcards ie. foo.bar.baz
-
validateKey
public static void validateKey(String pattern) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-