Class PropertyUtil


  • public final class PropertyUtil
    extends java.lang.Object
    Property utilities.
    Version:
    $Id$
    Author:
    Greg Luck
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String extractAndLogProperty​(java.lang.String name, java.util.Map properties)  
      static java.lang.String extractAndLogProperty​(java.lang.String name, java.util.Properties properties)  
      static boolean parseBoolean​(java.lang.String value)
      Null safe, parser of boolean from a String
      static java.util.Properties parseProperties​(java.lang.String propertiesString, java.lang.String propertySeparator)
      Parse properties supplied as a comma separated list into a Properties object
      • Methods inherited from class java.lang.Object

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

      • extractAndLogProperty

        public static java.lang.String extractAndLogProperty​(java.lang.String name,
                                                             java.util.Properties properties)
        Returns:
        null if their is no property for the key, or their are no properties
      • extractAndLogProperty

        public static java.lang.String extractAndLogProperty​(java.lang.String name,
                                                             java.util.Map properties)
        Returns:
        null if their is no property for the key, or their are no properties
      • parseProperties

        public static java.util.Properties parseProperties​(java.lang.String propertiesString,
                                                           java.lang.String propertySeparator)
        Parse properties supplied as a comma separated list into a Properties object
        Parameters:
        propertiesString - a comma separated list such as "propertyA=s, propertyB=t"
        Returns:
        a newly constructed properties object
      • parseBoolean

        public static boolean parseBoolean​(java.lang.String value)
        Null safe, parser of boolean from a String
        Parameters:
        value -
        Returns:
        true if non null and case insensitively matches true