1 /*
2 * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify itA
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27 package java.util;
28
29 @SuppressWarnings({"unchecked", "deprecation", "all"})
30 public class HashMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.Map<K,V>, java.lang.Cloneable, java.io.Serializable {
31
HashMap(int initialCapacity, float loadFactor)32 public HashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); }
33
HashMap(int initialCapacity)34 public HashMap(int initialCapacity) { throw new RuntimeException("Stub!"); }
35
HashMap()36 public HashMap() { throw new RuntimeException("Stub!"); }
37
HashMap(java.util.Map<? extends K,? extends V> m)38 public HashMap(java.util.Map<? extends K,? extends V> m) { throw new RuntimeException("Stub!"); }
39
size()40 public int size() { throw new RuntimeException("Stub!"); }
41
isEmpty()42 public boolean isEmpty() { throw new RuntimeException("Stub!"); }
43
get(java.lang.Object key)44 public V get(java.lang.Object key) { throw new RuntimeException("Stub!"); }
45
containsKey(java.lang.Object key)46 public boolean containsKey(java.lang.Object key) { throw new RuntimeException("Stub!"); }
47
put(K key, V value)48 public V put(K key, V value) { throw new RuntimeException("Stub!"); }
49
putAll(java.util.Map<? extends K,? extends V> m)50 public void putAll(java.util.Map<? extends K,? extends V> m) { throw new RuntimeException("Stub!"); }
51
remove(java.lang.Object key)52 public V remove(java.lang.Object key) { throw new RuntimeException("Stub!"); }
53
clear()54 public void clear() { throw new RuntimeException("Stub!"); }
55
containsValue(java.lang.Object value)56 public boolean containsValue(java.lang.Object value) { throw new RuntimeException("Stub!"); }
57
keySet()58 public java.util.Set<K> keySet() { throw new RuntimeException("Stub!"); }
59
values()60 public java.util.Collection<V> values() { throw new RuntimeException("Stub!"); }
61
entrySet()62 public java.util.Set<java.util.Map.Entry<K,V>> entrySet() { throw new RuntimeException("Stub!"); }
63
getOrDefault(java.lang.Object key, V defaultValue)64 public V getOrDefault(java.lang.Object key, V defaultValue) { throw new RuntimeException("Stub!"); }
65
putIfAbsent(K key, V value)66 public V putIfAbsent(K key, V value) { throw new RuntimeException("Stub!"); }
67
remove(java.lang.Object key, java.lang.Object value)68 public boolean remove(java.lang.Object key, java.lang.Object value) { throw new RuntimeException("Stub!"); }
69
replace(K key, V oldValue, V newValue)70 public boolean replace(K key, V oldValue, V newValue) { throw new RuntimeException("Stub!"); }
71
replace(K key, V value)72 public V replace(K key, V value) { throw new RuntimeException("Stub!"); }
73
computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)74 public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction) { throw new RuntimeException("Stub!"); }
75
computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)76 public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction) { throw new RuntimeException("Stub!"); }
77
compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)78 public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction) { throw new RuntimeException("Stub!"); }
79
merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)80 public V merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction) { throw new RuntimeException("Stub!"); }
81
forEach(java.util.function.BiConsumer<? super K,? super V> action)82 public void forEach(java.util.function.BiConsumer<? super K,? super V> action) { throw new RuntimeException("Stub!"); }
83
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)84 public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function) { throw new RuntimeException("Stub!"); }
85
clone()86 public java.lang.Object clone() { throw new RuntimeException("Stub!"); }
87
88 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
newHashMap(int numMappings)89 public static <K, V> java.util.HashMap<K,V> newHashMap(int numMappings) { throw new RuntimeException("Stub!"); }
90 }
91
92