synchronized void putAll(Map<String, String> keyValueMap) { Iterator<Entry<String, String>> it = keyValueMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, String> entry = it.next(); put(entry.getKey(), entry.getValue()); } }
synchronized void putAll(Map<String, String> keyValueMap) { Iterator<Entry<String, String>> it = keyValueMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, String> entry = it.next(); put(entry.getKey(), entry.getValue()); } }
/** * Go through all the properties and evaluate any expressions that have not * been resolved. */ public void evaluateProperties() { for (Entry<String, String> e : entrySet()) { String key = e.getKey(); String val = e.getValue(); String eval = eval(val); if (eval != null && !eval.equals(val)) { put(key, eval); } } }
/** * Go through all the properties and evaluate any expressions that have not * been resolved. */ public void evaluateProperties() { for (Entry<String, String> e : entrySet()) { String key = e.getKey(); String val = e.getValue(); String eval = eval(val); if (eval != null && !eval.equals(val)) { put(key, eval); } } }
/** * Go through all the properties and evaluate any expressions that have not * been resolved. */ public void evaluateProperties() { for (Entry<String, String> e : entrySet()) { String key = e.getKey(); String val = e.getValue(); String eval = eval(val); if (eval != null && !eval.equals(val)) { put(key, eval); } } }
public static PropertyMap load(PropertyMap p, Properties props) { if (p == null) { p = new PropertyMap(); } // put values in initially without any evaluation for (Map.Entry<Object, Object> entry : props.entrySet()) { String key = ((String) entry.getKey()).toLowerCase(); String val = ((String) entry.getValue()); if (val != null) { val = val.trim(); } p.put(key, val); } p.evaluateProperties(); String otherProps = p.remove("load.properties"); if (otherProps == null) { otherProps = p.remove("load.properties.override"); } if (otherProps != null) { otherProps = otherProps.replace("\\", "/"); InputStream is = findInputStream(otherProps); if (is != null) { logger.debug("loading properties from " + otherProps); load(p, is); } else { logger.error("load.properties " + otherProps + " not found."); } } return p; }
val = val.trim(); p.put(key, val);
val = val.trim(); p.put(key, val);