Java HashMap Create createHashMap()

Here you can find the source of createHashMap()

Description

Creates a mutable, empty HashMap instance.

License

Open Source License

Return

a new, empty HashMap

Declaration

@Deprecated

public static <K, V> HashMap<K, V> createHashMap() 

Method Source Code

//package com.java2s;
/*//w ww . j a  va2s .co m
 * This file is part of Bukkit Plugin Utilities.
 * 
 * Bukkit Plugin Utilities is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the License,
 * or (at your option) any later version.
 * 
 * Bukkit Plugin Utilities is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Bukkit Plugin Utilities.
 * If not, see <http://www.gnu.org/licenses/>.
 */

import java.util.HashMap;

public class Main {
    /**
     * Creates a <i>mutable</i>, empty {@code HashMap} instance.
     * 
     * @return a new, empty {@code HashMap}
     * @deprecated Use {@link Maps#newHashMap()} instead.
     */
    @Deprecated
    // TODO: Remove with BPU 2
    public static <K, V> HashMap<K, V> createHashMap() {
        return new HashMap<K, V>();
    }
}

Related

  1. createHashMap()
  2. createHashMap(int expectedMapSize)
  3. createHashMap(int initialCapacity)
  4. createHashMap(int initialCapacity)
  5. createHashMap(int size)