Package org.tanukisoftware.wrapper
Class WrapperPropertyUtil
- java.lang.Object
-
- org.tanukisoftware.wrapper.WrapperPropertyUtil
-
public final class WrapperPropertyUtil extends java.lang.ObjectA collection of utility methods which make it easy to work with Wrapper configuration Properties without littering code with error handling. System Properties can be accessed with the WrapperSystemPropertyUtil class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleangetBooleanProperty(java.lang.String name, boolean defaultValue)Resolves a boolean property.static intgetIntProperty(java.lang.String name, int defaultValue)Resolves an integer property.static longgetLongProperty(java.lang.String name, long defaultValue)Resolves a long property.static java.lang.StringgetStringProperty(java.lang.String name, java.lang.String defaultValue)Resolves a string property.
-
-
-
Method Detail
-
getStringProperty
public static java.lang.String getStringProperty(java.lang.String name, java.lang.String defaultValue)Resolves a string property.- Parameters:
name- The name of the property to lookup.defaultValue- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getBooleanProperty
public static boolean getBooleanProperty(java.lang.String name, boolean defaultValue)Resolves a boolean property.- Parameters:
name- The name of the property to lookup.defaultValue- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getIntProperty
public static int getIntProperty(java.lang.String name, int defaultValue)Resolves an integer property.- Parameters:
name- The name of the property to lookup.defaultValue- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getLongProperty
public static long getLongProperty(java.lang.String name, long defaultValue)Resolves a long property.- Parameters:
name- The name of the property to lookup.defaultValue- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
-