1 /*
2  * Copyright (c) 1997, 2020, 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 it
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 interface Map<K, V> {
31 
size()32 public int size();
33 
isEmpty()34 public boolean isEmpty();
35 
containsKey(java.lang.Object key)36 public boolean containsKey(java.lang.Object key);
37 
containsValue(java.lang.Object value)38 public boolean containsValue(java.lang.Object value);
39 
get(java.lang.Object key)40 public V get(java.lang.Object key);
41 
put(K key, V value)42 public V put(K key, V value);
43 
remove(java.lang.Object key)44 public V remove(java.lang.Object key);
45 
putAll(java.util.Map<? extends K,? extends V> m)46 public void putAll(java.util.Map<? extends K,? extends V> m);
47 
clear()48 public void clear();
49 
keySet()50 public java.util.Set<K> keySet();
51 
values()52 public java.util.Collection<V> values();
53 
entrySet()54 public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
55 
equals(java.lang.Object o)56 public boolean equals(java.lang.Object o);
57 
hashCode()58 public int hashCode();
59 
getOrDefault(java.lang.Object key, V defaultValue)60 public default V getOrDefault(java.lang.Object key, V defaultValue) { throw new RuntimeException("Stub!"); }
61 
forEach(java.util.function.BiConsumer<? super K,? super V> action)62 public default void forEach(java.util.function.BiConsumer<? super K,? super V> action) { throw new RuntimeException("Stub!"); }
63 
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)64 public default void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function) { throw new RuntimeException("Stub!"); }
65 
putIfAbsent(K key, V value)66 public default V putIfAbsent(K key, V value) { throw new RuntimeException("Stub!"); }
67 
remove(java.lang.Object key, java.lang.Object value)68 public default boolean remove(java.lang.Object key, java.lang.Object value) { throw new RuntimeException("Stub!"); }
69 
replace(K key, V oldValue, V newValue)70 public default boolean replace(K key, V oldValue, V newValue) { throw new RuntimeException("Stub!"); }
71 
replace(K key, V value)72 public default 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 default 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 default 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 default 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 default V merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction) { throw new RuntimeException("Stub!"); }
81 
of()82 public static <K, V> java.util.Map<K,V> of() { throw new RuntimeException("Stub!"); }
83 
of(K k1, V v1)84 public static <K, V> java.util.Map<K,V> of(K k1, V v1) { throw new RuntimeException("Stub!"); }
85 
of(K k1, V v1, K k2, V v2)86 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2) { throw new RuntimeException("Stub!"); }
87 
of(K k1, V v1, K k2, V v2, K k3, V v3)88 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3) { throw new RuntimeException("Stub!"); }
89 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)90 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) { throw new RuntimeException("Stub!"); }
91 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)92 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) { throw new RuntimeException("Stub!"); }
93 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)94 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) { throw new RuntimeException("Stub!"); }
95 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)96 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) { throw new RuntimeException("Stub!"); }
97 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8)98 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) { throw new RuntimeException("Stub!"); }
99 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9)100 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) { throw new RuntimeException("Stub!"); }
101 
of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10)102 public static <K, V> java.util.Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) { throw new RuntimeException("Stub!"); }
103 
104 @java.lang.SafeVarargs
ofEntries(java.util.Map.Entry<? extends K,? extends V>.... entries)105 public static <K, V> java.util.Map<K,V> ofEntries(java.util.Map.Entry<? extends K,? extends V>... entries) { throw new RuntimeException("Stub!"); }
106 
entry(K k, V v)107 public static <K, V> java.util.Map.Entry<K,V> entry(K k, V v) { throw new RuntimeException("Stub!"); }
108 
copyOf(java.util.Map<? extends K,? extends V> map)109 public static <K, V> java.util.Map<K,V> copyOf(java.util.Map<? extends K,? extends V> map) { throw new RuntimeException("Stub!"); }
110 @SuppressWarnings({"unchecked", "deprecation", "all"})
111 public static interface Entry<K, V> {
112 
getKey()113 public K getKey();
114 
getValue()115 public V getValue();
116 
setValue(V value)117 public V setValue(V value);
118 
equals(java.lang.Object o)119 public boolean equals(java.lang.Object o);
120 
hashCode()121 public int hashCode();
122 
comparingByKey()123 public static <K extends java.lang.Comparable<? super K>, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByKey() { throw new RuntimeException("Stub!"); }
124 
comparingByValue()125 public static <K, V extends java.lang.Comparable<? super V>> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByValue() { throw new RuntimeException("Stub!"); }
126 
comparingByKey(java.util.Comparator<? super K> cmp)127 public static <K, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByKey(java.util.Comparator<? super K> cmp) { throw new RuntimeException("Stub!"); }
128 
comparingByValue(java.util.Comparator<? super V> cmp)129 public static <K, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByValue(java.util.Comparator<? super V> cmp) { throw new RuntimeException("Stub!"); }
130 
131 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
copyOf(java.util.Map.Entry<? extends K,? extends V> e)132 public static <K, V> java.util.Map.Entry<K,V> copyOf(java.util.Map.Entry<? extends K,? extends V> e) { throw new RuntimeException("Stub!"); }
133 }
134 
135 }
136 
137