org.ops4j.util.property
Class PropertyStore

java.lang.Object
  extended by org.ops4j.util.property.PropertyStore

public class PropertyStore
extends Object

A simple generics based property store.

Since:
August 26, 2007
Author:
Alin Dreghiciu

Constructor Summary
PropertyStore()
          Creates a new configuration map.
 
Method Summary
 boolean contains(String propertyName)
          Returns true if the the property was set.
<T> T
get(String propertyName)
          Returns the property by name.
<T> T
set(String propertyName, T propertyValue)
          Sets a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyStore

public PropertyStore()
Creates a new configuration map.

Method Detail

contains

public boolean contains(String propertyName)
Returns true if the the property was set.

Parameters:
propertyName - name of the property
Returns:
true if property is set

set

public <T> T set(String propertyName,
                 T propertyValue)
Sets a property.

Parameters:
propertyName - name of the property to set
propertyValue - value of the property to set
Returns:
the value of property set (fluent api)

get

public <T> T get(String propertyName)
Returns the property by name.

Parameters:
propertyName - name of the property
Returns:
property value


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.