/** * Create a configuration buffer with an optional filter. The filter can be * used to remove unwanted options from a super class. * * @param filter if null there is no filter, otherwise the set of * configuration options is filtered. */ public ConfigurationBuffer(Class<? extends Configuration> configClass, Map<String, String> aliases, IConfigurationFilter filter) { this.configClass = configClass; this.varMap = new HashMap<String, List<ConfigurationValue>>(); this.committed = new HashSet<String>(); loadCache(configClass, filter); assert (varCache.size() > 0) : "coding error: nothing was configurable in the provided object!"; for (Map.Entry<String, String> e : aliases.entrySet()) { addAlias(e.getKey(), e.getValue()); } }
/** * Create a configuration buffer with an optional filter. The filter can be * used to remove unwanted options from a super class. * * @param filter if null there is no filter, otherwise the set of * configuration options is filtered. */ public ConfigurationBuffer(Class<? extends Configuration> configClass, Map<String, String> aliases, IConfigurationFilter filter) { this.configClass = configClass; this.varMap = new HashMap<String, List<ConfigurationValue>>(); this.committed = new HashSet<String>(); loadCache(configClass, filter); assert (varCache.size() > 0) : "coding error: nothing was configurable in the provided object!"; for (Map.Entry<String, String> e : aliases.entrySet()) { addAlias(e.getKey(), e.getValue()); } }