
org.eclipse.packagedrone.utils.Dictionaries Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2015 IBH SYSTEMS GmbH.
* 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:
* IBH SYSTEMS GmbH - initial API and implementation
*******************************************************************************/
package org.eclipse.packagedrone.utils;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;
public final class Dictionaries
{
private Dictionaries ()
{
}
public static Hashtable copy ( final Dictionary properties )
{
final Hashtable newProps = new Hashtable<> ( properties.size () );
final Enumeration en = properties.keys ();
while ( en.hasMoreElements () )
{
final String key = en.nextElement ();
newProps.put ( key, properties.get ( key ) );
}
return newProps;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy