1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package java.util; 28 29 import android.compat.annotation.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public class EnumMap<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K, V> 33 implements java.io.Serializable, java.lang.Cloneable { 34 EnumMap(java.lang.Class<K> keyType)35 public EnumMap(java.lang.Class<K> keyType) { 36 throw new RuntimeException("Stub!"); 37 } 38 EnumMap(java.util.EnumMap<K, ? extends V> m)39 public EnumMap(java.util.EnumMap<K, ? extends V> m) { 40 throw new RuntimeException("Stub!"); 41 } 42 EnumMap(java.util.Map<K, ? extends V> m)43 public EnumMap(java.util.Map<K, ? extends V> m) { 44 throw new RuntimeException("Stub!"); 45 } 46 maskNull(java.lang.Object value)47 private java.lang.Object maskNull(java.lang.Object value) { 48 throw new RuntimeException("Stub!"); 49 } 50 unmaskNull(java.lang.Object value)51 private V unmaskNull(java.lang.Object value) { 52 throw new RuntimeException("Stub!"); 53 } 54 size()55 public int size() { 56 throw new RuntimeException("Stub!"); 57 } 58 containsValue(java.lang.Object value)59 public boolean containsValue(java.lang.Object value) { 60 throw new RuntimeException("Stub!"); 61 } 62 containsKey(java.lang.Object key)63 public boolean containsKey(java.lang.Object key) { 64 throw new RuntimeException("Stub!"); 65 } 66 containsMapping(java.lang.Object key, java.lang.Object value)67 private boolean containsMapping(java.lang.Object key, java.lang.Object value) { 68 throw new RuntimeException("Stub!"); 69 } 70 get(java.lang.Object key)71 public V get(java.lang.Object key) { 72 throw new RuntimeException("Stub!"); 73 } 74 put(K key, V value)75 public V put(K key, V value) { 76 throw new RuntimeException("Stub!"); 77 } 78 remove(java.lang.Object key)79 public V remove(java.lang.Object key) { 80 throw new RuntimeException("Stub!"); 81 } 82 removeMapping(java.lang.Object key, java.lang.Object value)83 private boolean removeMapping(java.lang.Object key, java.lang.Object value) { 84 throw new RuntimeException("Stub!"); 85 } 86 isValidKey(java.lang.Object key)87 private boolean isValidKey(java.lang.Object key) { 88 throw new RuntimeException("Stub!"); 89 } 90 putAll(java.util.Map<? extends K, ? extends V> m)91 public void putAll(java.util.Map<? extends K, ? extends V> m) { 92 throw new RuntimeException("Stub!"); 93 } 94 clear()95 public void clear() { 96 throw new RuntimeException("Stub!"); 97 } 98 keySet()99 public java.util.Set<K> keySet() { 100 throw new RuntimeException("Stub!"); 101 } 102 values()103 public java.util.Collection<V> values() { 104 throw new RuntimeException("Stub!"); 105 } 106 entrySet()107 public java.util.Set<java.util.Map.Entry<K, V>> entrySet() { 108 throw new RuntimeException("Stub!"); 109 } 110 equals(java.lang.Object o)111 public boolean equals(java.lang.Object o) { 112 throw new RuntimeException("Stub!"); 113 } 114 equals(java.util.EnumMap<?, ?> em)115 private boolean equals(java.util.EnumMap<?, ?> em) { 116 throw new RuntimeException("Stub!"); 117 } 118 hashCode()119 public int hashCode() { 120 throw new RuntimeException("Stub!"); 121 } 122 entryHashCode(int index)123 private int entryHashCode(int index) { 124 throw new RuntimeException("Stub!"); 125 } 126 clone()127 public java.util.EnumMap<K, V> clone() { 128 throw new RuntimeException("Stub!"); 129 } 130 typeCheck(K key)131 private void typeCheck(K key) { 132 throw new RuntimeException("Stub!"); 133 } 134 getKeyUniverse(java.lang.Class<K> keyType)135 private static <K extends java.lang.Enum<K>> K[] getKeyUniverse(java.lang.Class<K> keyType) { 136 throw new RuntimeException("Stub!"); 137 } 138 writeObject(java.io.ObjectOutputStream s)139 private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { 140 throw new RuntimeException("Stub!"); 141 } 142 readObject(java.io.ObjectInputStream s)143 private void readObject(java.io.ObjectInputStream s) 144 throws java.lang.ClassNotFoundException, java.io.IOException { 145 throw new RuntimeException("Stub!"); 146 } 147 148 private static final java.lang.Object NULL; 149 150 static { 151 NULL = null; 152 } 153 154 private static final java.lang.Enum<?>[] ZERO_LENGTH_ENUM_ARRAY; 155 156 static { 157 ZERO_LENGTH_ENUM_ARRAY = new java.lang.Enum[0]; 158 } 159 160 private transient java.util.Set<java.util.Map.Entry<K, V>> entrySet; 161 162 @UnsupportedAppUsage 163 private final java.lang.Class<K> keyType; 164 165 { 166 keyType = null; 167 } 168 169 private transient K[] keyUniverse; 170 171 private static final long serialVersionUID = 458661240069192865L; // 0x65d7df7be907ca1L 172 173 private transient int size = 0; // 0x0 174 175 private transient java.lang.Object[] vals; 176 177 @SuppressWarnings({"unchecked", "deprecation", "all"}) 178 private class EntryIterator 179 extends EnumMapIterator<java.util.Map.Entry<K, V>> { 180 EntryIterator()181 private EntryIterator() { 182 throw new RuntimeException("Stub!"); 183 } 184 next()185 public java.util.Map.Entry<K, V> next() { 186 throw new RuntimeException("Stub!"); 187 } 188 remove()189 public void remove() { 190 throw new RuntimeException("Stub!"); 191 } 192 193 private java.util.EnumMap.EntryIterator.Entry lastReturnedEntry; 194 195 @SuppressWarnings({"unchecked", "deprecation", "all"}) 196 private class Entry implements java.util.Map.Entry<K, V> { 197 Entry(int index)198 private Entry(int index) { 199 throw new RuntimeException("Stub!"); 200 } 201 getKey()202 public K getKey() { 203 throw new RuntimeException("Stub!"); 204 } 205 getValue()206 public V getValue() { 207 throw new RuntimeException("Stub!"); 208 } 209 setValue(V value)210 public V setValue(V value) { 211 throw new RuntimeException("Stub!"); 212 } 213 equals(java.lang.Object o)214 public boolean equals(java.lang.Object o) { 215 throw new RuntimeException("Stub!"); 216 } 217 hashCode()218 public int hashCode() { 219 throw new RuntimeException("Stub!"); 220 } 221 toString()222 public java.lang.String toString() { 223 throw new RuntimeException("Stub!"); 224 } 225 checkIndexForEntryUse()226 private void checkIndexForEntryUse() { 227 throw new RuntimeException("Stub!"); 228 } 229 230 private int index; 231 } 232 } 233 234 @SuppressWarnings({"unchecked", "deprecation", "all"}) 235 private class EntrySet extends java.util.AbstractSet<java.util.Map.Entry<K, V>> { 236 EntrySet()237 private EntrySet() { 238 throw new RuntimeException("Stub!"); 239 } 240 iterator()241 public java.util.Iterator<java.util.Map.Entry<K, V>> iterator() { 242 throw new RuntimeException("Stub!"); 243 } 244 contains(java.lang.Object o)245 public boolean contains(java.lang.Object o) { 246 throw new RuntimeException("Stub!"); 247 } 248 remove(java.lang.Object o)249 public boolean remove(java.lang.Object o) { 250 throw new RuntimeException("Stub!"); 251 } 252 size()253 public int size() { 254 throw new RuntimeException("Stub!"); 255 } 256 clear()257 public void clear() { 258 throw new RuntimeException("Stub!"); 259 } 260 toArray()261 public java.lang.Object[] toArray() { 262 throw new RuntimeException("Stub!"); 263 } 264 toArray(T[] a)265 public <T> T[] toArray(T[] a) { 266 throw new RuntimeException("Stub!"); 267 } 268 fillEntryArray(java.lang.Object[] a)269 private java.lang.Object[] fillEntryArray(java.lang.Object[] a) { 270 throw new RuntimeException("Stub!"); 271 } 272 } 273 274 @SuppressWarnings({"unchecked", "deprecation", "all"}) 275 private abstract class EnumMapIterator<T> implements java.util.Iterator<T> { 276 EnumMapIterator()277 private EnumMapIterator() { 278 throw new RuntimeException("Stub!"); 279 } 280 hasNext()281 public boolean hasNext() { 282 throw new RuntimeException("Stub!"); 283 } 284 remove()285 public void remove() { 286 throw new RuntimeException("Stub!"); 287 } 288 checkLastReturnedIndex()289 private void checkLastReturnedIndex() { 290 throw new RuntimeException("Stub!"); 291 } 292 293 int index = 0; // 0x0 294 295 int lastReturnedIndex = -1; // 0xffffffff 296 } 297 298 @SuppressWarnings({"unchecked", "deprecation", "all"}) 299 private class KeyIterator extends EnumMapIterator<K> { 300 KeyIterator()301 private KeyIterator() { 302 throw new RuntimeException("Stub!"); 303 } 304 next()305 public K next() { 306 throw new RuntimeException("Stub!"); 307 } 308 } 309 310 @SuppressWarnings({"unchecked", "deprecation", "all"}) 311 private class KeySet extends java.util.AbstractSet<K> { 312 KeySet()313 private KeySet() { 314 throw new RuntimeException("Stub!"); 315 } 316 iterator()317 public java.util.Iterator<K> iterator() { 318 throw new RuntimeException("Stub!"); 319 } 320 size()321 public int size() { 322 throw new RuntimeException("Stub!"); 323 } 324 contains(java.lang.Object o)325 public boolean contains(java.lang.Object o) { 326 throw new RuntimeException("Stub!"); 327 } 328 remove(java.lang.Object o)329 public boolean remove(java.lang.Object o) { 330 throw new RuntimeException("Stub!"); 331 } 332 clear()333 public void clear() { 334 throw new RuntimeException("Stub!"); 335 } 336 } 337 338 @SuppressWarnings({"unchecked", "deprecation", "all"}) 339 private class ValueIterator extends EnumMapIterator<V> { 340 ValueIterator()341 private ValueIterator() { 342 throw new RuntimeException("Stub!"); 343 } 344 next()345 public V next() { 346 throw new RuntimeException("Stub!"); 347 } 348 } 349 350 @SuppressWarnings({"unchecked", "deprecation", "all"}) 351 private class Values extends java.util.AbstractCollection<V> { 352 Values()353 private Values() { 354 throw new RuntimeException("Stub!"); 355 } 356 iterator()357 public java.util.Iterator<V> iterator() { 358 throw new RuntimeException("Stub!"); 359 } 360 size()361 public int size() { 362 throw new RuntimeException("Stub!"); 363 } 364 contains(java.lang.Object o)365 public boolean contains(java.lang.Object o) { 366 throw new RuntimeException("Stub!"); 367 } 368 remove(java.lang.Object o)369 public boolean remove(java.lang.Object o) { 370 throw new RuntimeException("Stub!"); 371 } 372 clear()373 public void clear() { 374 throw new RuntimeException("Stub!"); 375 } 376 } 377 } 378