Class SystemPropertyUtil


  • public class SystemPropertyUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean getBoolean​(java.lang.String propertyKey, boolean defaultValue)
      Similar to Boolean.getBoolean(String) but uses the given default value if property were not set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SystemPropertyUtil

        public SystemPropertyUtil()
    • Method Detail

      • getBoolean

        public static boolean getBoolean​(java.lang.String propertyKey,
                                         boolean defaultValue)
        Similar to Boolean.getBoolean(String) but uses the given default value if property were not set.
        Parameters:
        propertyKey - the system property key
        defaultValue - the default value to use if property is not defined.
        Returns:
        true if the property is defined and contains "true" (ignoring case), else if system property is not set then the provided defaultValue, else false.