1 package org.objectweb.celtix.configuration.impl; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 6 import org.objectweb.celtix.configuration.Configuration; 7 import org.objectweb.celtix.configuration.ConfigurationProvider; 8 9 13 public class InMemoryProvider implements ConfigurationProvider { 14 15 private Map <String , Object > map; 16 17 public InMemoryProvider() { 18 map = new HashMap <String , Object >(); 19 } 20 21 public void init(Configuration configuration) { 22 } 23 24 public Object getObject(String name) { 25 return map.get(name); 26 } 27 28 public boolean setObject(String name, Object value) { 29 map.put(name, value); 30 return true; 31 } 32 33 public boolean save() { 34 return false; 35 } 36 } 37 | Popular Tags |