Example usage for org.apache.commons.collections ExtendedProperties keys

List of usage examples for org.apache.commons.collections ExtendedProperties keys

Introduction

In this page you can find the example usage for org.apache.commons.collections ExtendedProperties keys.

Prototype

public synchronized Enumeration<K> keys() 

Source Link

Document

Returns an enumeration of the keys in this hashtable.

Usage

From source file:com.liferay.portal.template.velocity.internal.FastExtendedProperties.java

public FastExtendedProperties(ExtendedProperties extendedProperties) throws IOException {

    // Do not call putAll. See LPS-61927.

    //putAll(extendedProperties);

    Enumeration keys = extendedProperties.keys();

    while (keys.hasMoreElements()) {
        String key = (String) keys.nextElement();

        Object value = extendedProperties.get(key);

        addProperty(key, value);//from w ww.  j  av  a 2  s. co m
    }
}

From source file:bboss.org.apache.velocity.runtime.RuntimeInstance.java

/**
 * Add all properties contained in the file fileName to the RuntimeInstance properties
 *///from   ww w .j av a  2 s .c  o m
public void setProperties(String fileName) {
    ExtendedProperties props = null;
    try {
        props = new ExtendedProperties(fileName);
    } catch (IOException e) {
        throw new VelocityException("Error reading properties from '" + fileName + "'", e);
    }

    Enumeration en = props.keys();
    while (en.hasMoreElements()) {
        String key = en.nextElement().toString();
        setProperty(key, props.get(key));
    }
}