Java Properties putAll(Properties properties, Map result)

Here you can find the source of putAll(Properties properties, Map result)

Description

Copies all elements from properties into the given result.

License

Open Source License

Parameter

Parameter Description
properties a parameter
result a parameter

Declaration

public static void putAll(Properties properties, Map<String, String> result) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors://from  w  w  w . jav a2s. co  m
 *     Cloudsmith Inc. - initial API and implementation
 *******************************************************************************/

import java.util.*;

public class Main {
    /**
     * Copies all elements from <code>properties</code> into the given <code>result</code>.
     * @param properties
     * @param result
     */
    public static void putAll(Properties properties, Map<String, String> result) {
        for (Enumeration<Object> keys = properties.keys(); keys.hasMoreElements();) {
            String key = (String) keys.nextElement();
            result.put(key, properties.getProperty(key));
        }
    }
}

Related

  1. mergePropertiesIntoMap(Properties props, Map map)
  2. mergeSystemProperties(Properties properties)
  3. propertiesToJson(Properties properties)
  4. propertiesToMap(Properties props)
  5. putAll(final Map props, final Properties p)
  6. putPrefixToProperties(String prefix, Properties pro)
  7. removeDots(Properties props)
  8. search(List properties, String term)
  9. setProperty(Properties props, String keyword, Object value)