net.sf.ehcache.util

Class PropertyUtil

public final class PropertyUtil extends Object

Property utilities.

Version: $Id: PropertyUtil.java 97 2006-05-28 10:10:25Z gregluck $

Author: Greg Luck

Method Summary
static StringextractAndLogProperty(String name, Properties properties)
static StringextractAndLogProperty(String name, Map properties)
static booleanparseBoolean(String value)
Null safe, parser of boolean from a String
static PropertiesparseProperties(String propertiesString)
Parse properties supplied as a comma separated list into a Properties object

Method Detail

extractAndLogProperty

public static String extractAndLogProperty(String name, Properties properties)

Returns: null if their is no property for the key, or their are no properties

extractAndLogProperty

public static String extractAndLogProperty(String name, Map properties)

Returns: null if their is no property for the key, or their are no properties

parseBoolean

public static boolean parseBoolean(String value)
Null safe, parser of boolean from a String

Parameters: value

Returns: true if non null and case insensitively matches true

parseProperties

public static Properties parseProperties(String propertiesString)
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