Mercurial > dive4elements > gnv-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
35:4405f31bbc30 | 36:ad381cc47217 |
---|---|
7 | 7 |
8 import org.apache.log4j.Logger; | 8 import org.apache.log4j.Logger; |
9 | 9 |
10 /** | 10 /** |
11 * @author Tim Englich <tim.englich@intevation.de> | 11 * @author Tim Englich <tim.englich@intevation.de> |
12 * | 12 * |
13 */ | 13 */ |
14 public class MapPropertiesReader implements PropertiesReader { | 14 public class MapPropertiesReader implements PropertiesReader { |
15 /** | 15 /** |
16 * the logger, used to log exceptions and additonaly information | 16 * the logger, used to log exceptions and additonaly information |
17 */ | 17 */ |
18 private static Logger log = Logger.getLogger(MapPropertiesReader.class); | 18 private static Logger log = Logger.getLogger(MapPropertiesReader.class); |
19 | 19 |
20 private Map<String,String> properties = null; | 20 private Map<String, String> properties = null; |
21 | |
21 /** | 22 /** |
22 * Constructor | 23 * Constructor |
23 */ | 24 */ |
24 public MapPropertiesReader(Map<String, String> properties) { | 25 public MapPropertiesReader(Map<String, String> properties) { |
25 super(); | 26 super(); |
26 this.properties = properties; | 27 this.properties = properties; |
27 } | 28 } |
28 | 29 |
29 /** | 30 /** |
30 * @see de.intevation.gnv.propertiesreader.PropertiesReader#getPropertieValue(java.lang.String, java.lang.String) | 31 * @see de.intevation.gnv.propertiesreader.PropertiesReader#getPropertieValue(java.lang.String, |
32 * java.lang.String) | |
31 */ | 33 */ |
32 public String getPropertieValue(String key, String defaultValue) { | 34 public String getPropertieValue(String key, String defaultValue) { |
33 String value = this.properties.get(key); | 35 String value = this.properties.get(key); |
34 if (value == null){ | 36 if (value == null) { |
35 value = defaultValue; | 37 value = defaultValue; |
36 } | 38 } |
37 return value; | 39 return value; |
38 } | 40 } |
39 | 41 |