Here you can find the source of putAll(Properties properties, Map
properties
into the given result
.
Parameter | Description |
---|---|
properties | a parameter |
result | a parameter |
public static void putAll(Properties properties, Map<String, String> result)
//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)); } } }