1 /* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * This code is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License version 2 only, as 6 * published by the Free Software Foundation. Oracle designates this 7 * particular file as subject to the "Classpath" exception as provided 8 * by Oracle in the LICENSE file that accompanied this code. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 */ 24 25 /* 26 * This file is available under and governed by the GNU General Public 27 * License version 2 only, as published by the Free Software Foundation. 28 * However, the following notice accompanied the original version of this 29 * file: 30 * 31 * Written by Josh Bloch of Google Inc. and released to the public domain, 32 * as explained at http://creativecommons.org/publicdomain/zero/1.0/. 33 */ 34 35 package java.util; 36 37 import dalvik.annotation.compat.UnsupportedAppUsage; 38 39 @SuppressWarnings({"unchecked", "deprecation", "all"}) 40 public class ArrayDeque<E> extends java.util.AbstractCollection<E> 41 implements java.util.Deque<E>, java.lang.Cloneable, java.io.Serializable { 42 ArrayDeque()43 public ArrayDeque() { 44 throw new RuntimeException("Stub!"); 45 } 46 ArrayDeque(int numElements)47 public ArrayDeque(int numElements) { 48 throw new RuntimeException("Stub!"); 49 } 50 ArrayDeque(java.util.Collection<? extends E> c)51 public ArrayDeque(java.util.Collection<? extends E> c) { 52 throw new RuntimeException("Stub!"); 53 } 54 allocateElements(int numElements)55 private void allocateElements(int numElements) { 56 throw new RuntimeException("Stub!"); 57 } 58 doubleCapacity()59 private void doubleCapacity() { 60 throw new RuntimeException("Stub!"); 61 } 62 addFirst(E e)63 public void addFirst(E e) { 64 throw new RuntimeException("Stub!"); 65 } 66 addLast(E e)67 public void addLast(E e) { 68 throw new RuntimeException("Stub!"); 69 } 70 offerFirst(E e)71 public boolean offerFirst(E e) { 72 throw new RuntimeException("Stub!"); 73 } 74 offerLast(E e)75 public boolean offerLast(E e) { 76 throw new RuntimeException("Stub!"); 77 } 78 removeFirst()79 public E removeFirst() { 80 throw new RuntimeException("Stub!"); 81 } 82 removeLast()83 public E removeLast() { 84 throw new RuntimeException("Stub!"); 85 } 86 pollFirst()87 public E pollFirst() { 88 throw new RuntimeException("Stub!"); 89 } 90 pollLast()91 public E pollLast() { 92 throw new RuntimeException("Stub!"); 93 } 94 getFirst()95 public E getFirst() { 96 throw new RuntimeException("Stub!"); 97 } 98 getLast()99 public E getLast() { 100 throw new RuntimeException("Stub!"); 101 } 102 peekFirst()103 public E peekFirst() { 104 throw new RuntimeException("Stub!"); 105 } 106 peekLast()107 public E peekLast() { 108 throw new RuntimeException("Stub!"); 109 } 110 removeFirstOccurrence(java.lang.Object o)111 public boolean removeFirstOccurrence(java.lang.Object o) { 112 throw new RuntimeException("Stub!"); 113 } 114 removeLastOccurrence(java.lang.Object o)115 public boolean removeLastOccurrence(java.lang.Object o) { 116 throw new RuntimeException("Stub!"); 117 } 118 add(E e)119 public boolean add(E e) { 120 throw new RuntimeException("Stub!"); 121 } 122 offer(E e)123 public boolean offer(E e) { 124 throw new RuntimeException("Stub!"); 125 } 126 remove()127 public E remove() { 128 throw new RuntimeException("Stub!"); 129 } 130 poll()131 public E poll() { 132 throw new RuntimeException("Stub!"); 133 } 134 element()135 public E element() { 136 throw new RuntimeException("Stub!"); 137 } 138 peek()139 public E peek() { 140 throw new RuntimeException("Stub!"); 141 } 142 push(E e)143 public void push(E e) { 144 throw new RuntimeException("Stub!"); 145 } 146 pop()147 public E pop() { 148 throw new RuntimeException("Stub!"); 149 } 150 checkInvariants()151 private void checkInvariants() { 152 throw new RuntimeException("Stub!"); 153 } 154 delete(int i)155 boolean delete(int i) { 156 throw new RuntimeException("Stub!"); 157 } 158 size()159 public int size() { 160 throw new RuntimeException("Stub!"); 161 } 162 isEmpty()163 public boolean isEmpty() { 164 throw new RuntimeException("Stub!"); 165 } 166 iterator()167 public java.util.Iterator<E> iterator() { 168 throw new RuntimeException("Stub!"); 169 } 170 descendingIterator()171 public java.util.Iterator<E> descendingIterator() { 172 throw new RuntimeException("Stub!"); 173 } 174 contains(java.lang.Object o)175 public boolean contains(java.lang.Object o) { 176 throw new RuntimeException("Stub!"); 177 } 178 remove(java.lang.Object o)179 public boolean remove(java.lang.Object o) { 180 throw new RuntimeException("Stub!"); 181 } 182 clear()183 public void clear() { 184 throw new RuntimeException("Stub!"); 185 } 186 toArray()187 public java.lang.Object[] toArray() { 188 throw new RuntimeException("Stub!"); 189 } 190 toArray(T[] a)191 public <T> T[] toArray(T[] a) { 192 throw new RuntimeException("Stub!"); 193 } 194 clone()195 public java.util.ArrayDeque<E> clone() { 196 throw new RuntimeException("Stub!"); 197 } 198 writeObject(java.io.ObjectOutputStream s)199 private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { 200 throw new RuntimeException("Stub!"); 201 } 202 readObject(java.io.ObjectInputStream s)203 private void readObject(java.io.ObjectInputStream s) 204 throws java.lang.ClassNotFoundException, java.io.IOException { 205 throw new RuntimeException("Stub!"); 206 } 207 spliterator()208 public java.util.Spliterator<E> spliterator() { 209 throw new RuntimeException("Stub!"); 210 } 211 212 private static final int MIN_INITIAL_CAPACITY = 8; // 0x8 213 214 @UnsupportedAppUsage 215 transient java.lang.Object[] elements; 216 217 @UnsupportedAppUsage 218 transient int head; 219 220 private static final long serialVersionUID = 2340985798034038923L; // 0x207cda2e240da08bL 221 222 @UnsupportedAppUsage 223 transient int tail; 224 225 @SuppressWarnings({"unchecked", "deprecation", "all"}) 226 private class DeqIterator implements java.util.Iterator<E> { 227 DeqIterator()228 private DeqIterator() { 229 throw new RuntimeException("Stub!"); 230 } 231 hasNext()232 public boolean hasNext() { 233 throw new RuntimeException("Stub!"); 234 } 235 next()236 public E next() { 237 throw new RuntimeException("Stub!"); 238 } 239 remove()240 public void remove() { 241 throw new RuntimeException("Stub!"); 242 } 243 forEachRemaining(java.util.function.Consumer<? super E> action)244 public void forEachRemaining(java.util.function.Consumer<? super E> action) { 245 throw new RuntimeException("Stub!"); 246 } 247 248 private int cursor; 249 250 private int fence; 251 252 private int lastRet = -1; // 0xffffffff 253 } 254 255 @SuppressWarnings({"unchecked", "deprecation", "all"}) 256 static final class DeqSpliterator<E> implements java.util.Spliterator<E> { 257 DeqSpliterator(java.util.ArrayDeque<E> deq, int origin, int fence)258 DeqSpliterator(java.util.ArrayDeque<E> deq, int origin, int fence) { 259 throw new RuntimeException("Stub!"); 260 } 261 getFence()262 private int getFence() { 263 throw new RuntimeException("Stub!"); 264 } 265 trySplit()266 public java.util.ArrayDeque.DeqSpliterator<E> trySplit() { 267 throw new RuntimeException("Stub!"); 268 } 269 forEachRemaining(java.util.function.Consumer<? super E> consumer)270 public void forEachRemaining(java.util.function.Consumer<? super E> consumer) { 271 throw new RuntimeException("Stub!"); 272 } 273 tryAdvance(java.util.function.Consumer<? super E> consumer)274 public boolean tryAdvance(java.util.function.Consumer<? super E> consumer) { 275 throw new RuntimeException("Stub!"); 276 } 277 estimateSize()278 public long estimateSize() { 279 throw new RuntimeException("Stub!"); 280 } 281 characteristics()282 public int characteristics() { 283 throw new RuntimeException("Stub!"); 284 } 285 286 private final java.util.ArrayDeque<E> deq; 287 288 { 289 deq = null; 290 } 291 292 private int fence; 293 294 private int index; 295 } 296 297 @SuppressWarnings({"unchecked", "deprecation", "all"}) 298 private class DescendingIterator implements java.util.Iterator<E> { 299 DescendingIterator()300 private DescendingIterator() { 301 throw new RuntimeException("Stub!"); 302 } 303 hasNext()304 public boolean hasNext() { 305 throw new RuntimeException("Stub!"); 306 } 307 next()308 public E next() { 309 throw new RuntimeException("Stub!"); 310 } 311 remove()312 public void remove() { 313 throw new RuntimeException("Stub!"); 314 } 315 316 private int cursor; 317 318 private int fence; 319 320 private int lastRet = -1; // 0xffffffff 321 } 322 } 323