Top Description Fields Constructors Methods
net.sf.ehcache.util

public final Class PropertyUtil

extends Object
Class Inheritance
Imports
java.io.IOException, .StringReader, java.util.Map, .Properties, org.slf4j.Logger, .LoggerFactory

Property utilities.
Author
Greg Luck
Version
$Id: PropertyUtil.java 5594 2012-05-07 16:04:31Z cdennis $

Field Summary

Modifier and TypeField and Description
private static final String
private static final Logger

Constructor Summary

AccessConstructor and Description
private
PropertyUtil()

Utility class therefore no constructor.

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

null if their is no property for the key, or their are no properties
extractAndLogProperty
(String name, Properties properties)

public static String

Returns:

null if their is no property for the key, or their are no properties
extractAndLogProperty
(String name, Map<K, V> properties)

public static boolean

Returns:

true if non null and case insensitively matches true
parseBoolean
(String value)

Null safe, parser of boolean from a String

public static Properties

Returns:

a newly constructed properties object
parseProperties
(String
a comma separated list such as "propertyA=s, propertyB=t"
propertiesString
,
String propertySeparator)

Parse properties supplied as a comma separated list into a Properties object

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_PROPERTY_SEPARATORback to summary
private static final String DEFAULT_PROPERTY_SEPARATOR
LOGback to summary
private static final Logger LOG

Constructor Detail

PropertyUtilback to summary
private PropertyUtil()

Utility class therefore no constructor.

Method Detail

extractAndLogPropertyback to summary
public static String extractAndLogProperty(String name, Properties properties)
Returns:String

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

extractAndLogPropertyback to summary
public static String extractAndLogProperty(String name, Map<K, V> properties)
Returns:String

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

parseBooleanback to summary
public static boolean parseBoolean(String value)

Null safe, parser of boolean from a String

Returns:boolean

true if non null and case insensitively matches true

parsePropertiesback to summary
public static Properties parseProperties(String propertiesString, String propertySeparator)

Parse properties supplied as a comma separated list into a Properties object

Parameters
propertiesString:String

a comma separated list such as "propertyA=s, propertyB=t"

Returns:Properties

a newly constructed properties object