Example usage for org.apache.commons.configuration2 HierarchicalConfiguration clear

List of usage examples for org.apache.commons.configuration2 HierarchicalConfiguration clear

Introduction

In this page you can find the example usage for org.apache.commons.configuration2 HierarchicalConfiguration clear.

Prototype

void clear();

Source Link

Document

Remove all properties from the configuration.

Usage

From source file:com.github.technosf.posterer.modules.commons.config.CommonsConfiguratorPropertiesImpl.java

/**
 * Load saved proxies into current session
 *///from ww w  . j  a va2 s  . co m
@SuppressWarnings("null")
private void initializeKeyStoreSet() {
    for (HierarchicalConfiguration<ImmutableNode> c : config.configurationsAt((PROP_KEYSTORES_KEYSTORE))) {
        String filepath = c.toString();
        if (filepath != null && !filepath.isEmpty()) {
            if (!putIfAbsent(filepath)) {
                c.clear();
                dirty();
            }
        }
    }

}