org.eviline
Class BasicPropertySource

java.lang.Object
  extended by org.eviline.BasicPropertySource
All Implemented Interfaces:
Serializable, PropertySource

public class BasicPropertySource
extends Object
implements PropertySource, Serializable

A basic implementation of PropertySource backed by a Map.

Author:
robin
See Also:
Serialized Form

Field Summary
protected  Map<String,String> map
          The map that backs this BasicPropertySource.
 
Constructor Summary
BasicPropertySource()
          Create a new BasicPropertySource backed by a TreeMap
BasicPropertySource(Map<String,String> p)
          Create a BasicPropertySource backed by the argument Map.
BasicPropertySource(Properties p)
          Create a BasicPropertySource backed by the argument Properties.
 
Method Summary
 boolean containsKey(String key)
          Does the specified property key exist?
 String get(String key)
          Return the value of the specified property key
 Set<String> keys()
          Return the set of all property keys
 String put(String key, String value)
          Set the value of the specified property key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected Map<String,String> map
The map that backs this BasicPropertySource.

Constructor Detail

BasicPropertySource

public BasicPropertySource()
Create a new BasicPropertySource backed by a TreeMap


BasicPropertySource

public BasicPropertySource(Properties p)
Create a BasicPropertySource backed by the argument Properties.

Parameters:
p -

BasicPropertySource

public BasicPropertySource(Map<String,String> p)
Create a BasicPropertySource backed by the argument Map.

Parameters:
p -
Method Detail

containsKey

public boolean containsKey(String key)
Description copied from interface: PropertySource
Does the specified property key exist?

Specified by:
containsKey in interface PropertySource
Returns:

get

public String get(String key)
Description copied from interface: PropertySource
Return the value of the specified property key

Specified by:
get in interface PropertySource
Returns:

put

public String put(String key,
                  String value)
Description copied from interface: PropertySource
Set the value of the specified property key

Specified by:
put in interface PropertySource
Returns:

keys

public Set<String> keys()
Description copied from interface: PropertySource
Return the set of all property keys

Specified by:
keys in interface PropertySource
Returns:


Copyright © 2013. All Rights Reserved.