public CombinedConfiguration(NodeCombiner comb, Lock lock) { super(lock); setNodeCombiner((comb != null) ? comb : DEFAULT_COMBINER); clear(); }
@Override public void clear() { if (configs != null) { this.getCurrentConfig().clear(); } }
@Override public void clear() { if (configs != null) { this.getCurrentConfig().clear(); } }
/** * Creates a new instance of {@code CombinedConfiguration} and * initializes the combiner to be used. * * @param comb the node combiner (can be <b>null</b>, then a union combiner * is used as default) */ public CombinedConfiguration(NodeCombiner comb) { setNodeCombiner((comb != null) ? comb : DEFAULT_COMBINER); clear(); }
public CombinedConfiguration(NodeCombiner comb, Lock lock) { super(lock); setNodeCombiner((comb != null) ? comb : DEFAULT_COMBINER); clear(); }
/** * Creates a new instance of {@code CombinedConfiguration} and * initializes the combiner to be used. * * @param comb the node combiner (can be <b>null</b>, then a union combiner * is used as default) */ public CombinedConfiguration(NodeCombiner comb) { setNodeCombiner((comb != null) ? comb : DEFAULT_COMBINER); clear(); }
/** * Returns a copy of this object. This implementation performs a deep clone, * i.e. all contained configurations will be cloned, too. For this to work, * all contained configurations must be cloneable. Registered event * listeners won't be cloned. The clone will use the same node combiner than * the original. * * @return the copied object */ @Override public Object clone() { CombinedConfiguration copy = (CombinedConfiguration) super.clone(); copy.clear(); for (ConfigData cd : configurations) { copy.addConfiguration((AbstractConfiguration) ConfigurationUtils .cloneConfiguration(cd.getConfiguration()), cd.getName(), cd.getAt()); } copy.setRootNode(new DefaultConfigurationNode()); return copy; }
/** * Returns a copy of this object. This implementation performs a deep clone, * i.e. all contained configurations will be cloned, too. For this to work, * all contained configurations must be cloneable. Registered event * listeners won't be cloned. The clone will use the same node combiner than * the original. * * @return the copied object */ @Override public Object clone() { CombinedConfiguration copy = (CombinedConfiguration) super.clone(); copy.clear(); for (ConfigData cd : configurations) { copy.addConfiguration((AbstractConfiguration) ConfigurationUtils .cloneConfiguration(cd.getConfiguration()), cd.getName(), cd.getAt()); } copy.setRootNode(new DefaultConfigurationNode()); return copy; }