Java Properties to Map toMap(Properties props)

Here you can find the source of toMap(Properties props)

Description

to Map

License

Mozilla Public License

Declaration

public static Map<String, String> toMap(Properties props) 

Method Source Code

//package com.java2s;
/******************************************************************************
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0.  If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 * /* www  . j  a  v  a 2  s .c  o  m*/
 * Software distributed under the License is distributed on an "AS IS" basis, 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
 * the specific language governing rights and limitations under the License.
 *
 * The Original Code is: FetchMailAtt
 * The Initial Developer of the Original Code is: William Wong (williamw520@gmail.com)
 * Portions created by William Wong are Copyright (C) 2015 William Wong, All Rights Reserved.
 *
 ******************************************************************************/

import java.util.*;

public class Main {
    public static Map<String, String> toMap(Properties props) {
        return props == null ? new HashMap<String, String>() : new HashMap<String, String>((Map) props);
    }
}

Related

  1. toMap(Properties properties)
  2. toMap(Properties properties)
  3. toMap(Properties properties)
  4. toMap(Properties properties)
  5. toMap(Properties props)
  6. toMap(Properties props)
  7. toMap(Properties props)
  8. toMap(Properties props, String prefix)
  9. toMap(Properties sourceProperties)