org.oddjob.arooa.standard
Class StandardPropertyLookup

java.lang.Object
  extended by org.oddjob.arooa.standard.StandardPropertyLookup
All Implemented Interfaces:
PropertyLookup

public class StandardPropertyLookup
extends Object
implements PropertyLookup

A simple implementation of a PropertyLookup.

See Also:
PropertyManager
Author:
rob

Constructor Summary
StandardPropertyLookup(Properties properties, String source)
           
 
Method Summary
 String lookup(String propertyName)
          Return the value of a property, or null if it doesn't exist.
 Set<String> propertyNames()
          Return all property names in this property lookup.
 PropertySource sourceFor(String propertyName)
          Return a source for the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardPropertyLookup

public StandardPropertyLookup(Properties properties,
                              String source)
Method Detail

lookup

public String lookup(String propertyName)
Description copied from interface: PropertyLookup
Return the value of a property, or null if it doesn't exist.

Specified by:
lookup in interface PropertyLookup
Parameters:
propertyName - The name of the property.
Returns:
The value or null.

sourceFor

public PropertySource sourceFor(String propertyName)
Description copied from interface: PropertyLookup
Return a source for the property.

Specified by:
sourceFor in interface PropertyLookup
Parameters:
propertyName - The property name.
Returns:
The source, or null if the property isn't known.

propertyNames

public Set<String> propertyNames()
Description copied from interface: PropertyLookup
Return all property names in this property lookup.

Specified by:
propertyNames in interface PropertyLookup
Returns:
The property names. Never null.