Package org.opennms.netmgt.config.utils
Class ConfigUtils
- java.lang.Object
-
- org.opennms.netmgt.config.utils.ConfigUtils
-
public abstract class ConfigUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConfigUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
assertMatches(java.lang.String value, java.util.regex.Pattern pattern, java.lang.String name)
static <T extends java.lang.Number>
TassertMinimumInclusive(T value, long minimum, java.lang.String name)
static <T extends java.util.Collection<?>>
TassertMinimumSize(T value, long minimum, java.lang.String name)
static <T> T
assertNotEmpty(T value, java.lang.String name)
static <T> T
assertNotNull(T value, java.lang.String name)
static <K,T>
TassertOnlyContains(T value, java.util.Collection<K> in, java.lang.String name)
static java.lang.String
normalizeAndInternString(java.lang.String value)
static java.lang.String
normalizeAndTrimString(java.lang.String value)
static java.lang.String
normalizeString(java.lang.String s)
-
-
-
Method Detail
-
assertNotNull
public static <T> T assertNotNull(T value, java.lang.String name) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
assertNotEmpty
public static <T> T assertNotEmpty(T value, java.lang.String name) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
normalizeString
public static java.lang.String normalizeString(java.lang.String s)
-
normalizeAndTrimString
public static java.lang.String normalizeAndTrimString(java.lang.String value)
-
normalizeAndInternString
public static java.lang.String normalizeAndInternString(java.lang.String value)
-
assertMinimumInclusive
public static <T extends java.lang.Number> T assertMinimumInclusive(T value, long minimum, java.lang.String name)
-
assertMinimumSize
public static <T extends java.util.Collection<?>> T assertMinimumSize(T value, long minimum, java.lang.String name)
-
assertOnlyContains
public static <K,T> T assertOnlyContains(T value, java.util.Collection<K> in, java.lang.String name)
-
assertMatches
public static java.lang.String assertMatches(java.lang.String value, java.util.regex.Pattern pattern, java.lang.String name)
-
-