Mercurial > dive4elements > gnv-client
view gnv/src/main/java/de/intevation/gnv/propertiesreader/MapPropertiesReader.java @ 36:ad381cc47217
Format Code to max 80 Chars per Row
gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:54:13 +0000 |
parents | d7b4a77ba892 |
children | 15ac78a91d1b |
line wrap: on
line source
/** * */ package de.intevation.gnv.propertiesreader; import java.util.Map; import org.apache.log4j.Logger; /** * @author Tim Englich <tim.englich@intevation.de> * */ public class MapPropertiesReader implements PropertiesReader { /** * the logger, used to log exceptions and additonaly information */ private static Logger log = Logger.getLogger(MapPropertiesReader.class); private Map<String, String> properties = null; /** * Constructor */ public MapPropertiesReader(Map<String, String> properties) { super(); this.properties = properties; } /** * @see de.intevation.gnv.propertiesreader.PropertiesReader#getPropertieValue(java.lang.String, * java.lang.String) */ public String getPropertieValue(String key, String defaultValue) { String value = this.properties.get(key); if (value == null) { value = defaultValue; } return value; } }