List of usage examples for org.apache.commons.configuration CombinedConfiguration clear
public void clear()
From source file:org.ssh.test.conf.IConfiguration.java
/** * 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./* w ww.ja va2 s .c o m*/ * * @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; }