Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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:
 *     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));
        }
    }
}