Package org.opennms.core.sysprops
Class SystemProperties
- java.lang.Object
-
- org.opennms.core.sysprops.SystemProperties
-
public class SystemProperties extends Object
Utility to extract system properties, similar to Integer.getInteger. This class allows to distinguish between a none present value and a malformed value. In case of the latter a log message is produced. Integer.getInteger would just return the defaultValue without informing the user and can therefor lead to hard to find configuration problems.
-
-
Constructor Summary
Constructors Constructor Description SystemProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Boolean
getBooleanWithDefaultAsTrue(String name)
static Integer
getInteger(String propertyName)
static Integer
getInteger(String propertyName, int defaultValue)
static Integer
getInteger(String propertyName, Integer defaultValue)
static Long
getLong(String propertyName)
static Long
getLong(String propertyName, int defaultValue)
static Long
getLong(String propertyName, Long defaultValue)
-