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 Doug Lea with assistance from members of JCP JSR-166 32 * Expert Group and released to the public domain, as explained at 33 * http://creativecommons.org/publicdomain/zero/1.0/ 34 */ 35 36 package java.util.concurrent; 37 38 import android.compat.annotation.UnsupportedAppUsage; 39 40 @SuppressWarnings({"unchecked", "deprecation", "all"}) 41 public class LinkedBlockingDeque<E> extends java.util.AbstractQueue<E> 42 implements java.util.concurrent.BlockingDeque<E>, java.io.Serializable { 43 LinkedBlockingDeque()44 public LinkedBlockingDeque() { 45 throw new RuntimeException("Stub!"); 46 } 47 LinkedBlockingDeque(int capacity)48 public LinkedBlockingDeque(int capacity) { 49 throw new RuntimeException("Stub!"); 50 } 51 LinkedBlockingDeque(java.util.Collection<? extends E> c)52 public LinkedBlockingDeque(java.util.Collection<? extends E> c) { 53 throw new RuntimeException("Stub!"); 54 } 55 linkFirst(Node<E> node)56 private boolean linkFirst(Node<E> node) { 57 throw new RuntimeException("Stub!"); 58 } 59 linkLast(Node<E> node)60 private boolean linkLast(Node<E> node) { 61 throw new RuntimeException("Stub!"); 62 } 63 unlinkFirst()64 private E unlinkFirst() { 65 throw new RuntimeException("Stub!"); 66 } 67 unlinkLast()68 private E unlinkLast() { 69 throw new RuntimeException("Stub!"); 70 } 71 unlink(Node<E> x)72 void unlink(Node<E> x) { 73 throw new RuntimeException("Stub!"); 74 } 75 addFirst(E e)76 public void addFirst(E e) { 77 throw new RuntimeException("Stub!"); 78 } 79 addLast(E e)80 public void addLast(E e) { 81 throw new RuntimeException("Stub!"); 82 } 83 offerFirst(E e)84 public boolean offerFirst(E e) { 85 throw new RuntimeException("Stub!"); 86 } 87 offerLast(E e)88 public boolean offerLast(E e) { 89 throw new RuntimeException("Stub!"); 90 } 91 putFirst(E e)92 public void putFirst(E e) throws java.lang.InterruptedException { 93 throw new RuntimeException("Stub!"); 94 } 95 putLast(E e)96 public void putLast(E e) throws java.lang.InterruptedException { 97 throw new RuntimeException("Stub!"); 98 } 99 offerFirst(E e, long timeout, java.util.concurrent.TimeUnit unit)100 public boolean offerFirst(E e, long timeout, java.util.concurrent.TimeUnit unit) 101 throws java.lang.InterruptedException { 102 throw new RuntimeException("Stub!"); 103 } 104 offerLast(E e, long timeout, java.util.concurrent.TimeUnit unit)105 public boolean offerLast(E e, long timeout, java.util.concurrent.TimeUnit unit) 106 throws java.lang.InterruptedException { 107 throw new RuntimeException("Stub!"); 108 } 109 removeFirst()110 public E removeFirst() { 111 throw new RuntimeException("Stub!"); 112 } 113 removeLast()114 public E removeLast() { 115 throw new RuntimeException("Stub!"); 116 } 117 pollFirst()118 public E pollFirst() { 119 throw new RuntimeException("Stub!"); 120 } 121 pollLast()122 public E pollLast() { 123 throw new RuntimeException("Stub!"); 124 } 125 takeFirst()126 public E takeFirst() throws java.lang.InterruptedException { 127 throw new RuntimeException("Stub!"); 128 } 129 takeLast()130 public E takeLast() throws java.lang.InterruptedException { 131 throw new RuntimeException("Stub!"); 132 } 133 pollFirst(long timeout, java.util.concurrent.TimeUnit unit)134 public E pollFirst(long timeout, java.util.concurrent.TimeUnit unit) 135 throws java.lang.InterruptedException { 136 throw new RuntimeException("Stub!"); 137 } 138 pollLast(long timeout, java.util.concurrent.TimeUnit unit)139 public E pollLast(long timeout, java.util.concurrent.TimeUnit unit) 140 throws java.lang.InterruptedException { 141 throw new RuntimeException("Stub!"); 142 } 143 getFirst()144 public E getFirst() { 145 throw new RuntimeException("Stub!"); 146 } 147 getLast()148 public E getLast() { 149 throw new RuntimeException("Stub!"); 150 } 151 peekFirst()152 public E peekFirst() { 153 throw new RuntimeException("Stub!"); 154 } 155 peekLast()156 public E peekLast() { 157 throw new RuntimeException("Stub!"); 158 } 159 removeFirstOccurrence(java.lang.Object o)160 public boolean removeFirstOccurrence(java.lang.Object o) { 161 throw new RuntimeException("Stub!"); 162 } 163 removeLastOccurrence(java.lang.Object o)164 public boolean removeLastOccurrence(java.lang.Object o) { 165 throw new RuntimeException("Stub!"); 166 } 167 add(E e)168 public boolean add(E e) { 169 throw new RuntimeException("Stub!"); 170 } 171 offer(E e)172 public boolean offer(E e) { 173 throw new RuntimeException("Stub!"); 174 } 175 put(E e)176 public void put(E e) throws java.lang.InterruptedException { 177 throw new RuntimeException("Stub!"); 178 } 179 offer(E e, long timeout, java.util.concurrent.TimeUnit unit)180 public boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit) 181 throws java.lang.InterruptedException { 182 throw new RuntimeException("Stub!"); 183 } 184 remove()185 public E remove() { 186 throw new RuntimeException("Stub!"); 187 } 188 poll()189 public E poll() { 190 throw new RuntimeException("Stub!"); 191 } 192 take()193 public E take() throws java.lang.InterruptedException { 194 throw new RuntimeException("Stub!"); 195 } 196 poll(long timeout, java.util.concurrent.TimeUnit unit)197 public E poll(long timeout, java.util.concurrent.TimeUnit unit) 198 throws java.lang.InterruptedException { 199 throw new RuntimeException("Stub!"); 200 } 201 element()202 public E element() { 203 throw new RuntimeException("Stub!"); 204 } 205 peek()206 public E peek() { 207 throw new RuntimeException("Stub!"); 208 } 209 remainingCapacity()210 public int remainingCapacity() { 211 throw new RuntimeException("Stub!"); 212 } 213 drainTo(java.util.Collection<? super E> c)214 public int drainTo(java.util.Collection<? super E> c) { 215 throw new RuntimeException("Stub!"); 216 } 217 drainTo(java.util.Collection<? super E> c, int maxElements)218 public int drainTo(java.util.Collection<? super E> c, int maxElements) { 219 throw new RuntimeException("Stub!"); 220 } 221 push(E e)222 public void push(E e) { 223 throw new RuntimeException("Stub!"); 224 } 225 pop()226 public E pop() { 227 throw new RuntimeException("Stub!"); 228 } 229 remove(java.lang.Object o)230 public boolean remove(java.lang.Object o) { 231 throw new RuntimeException("Stub!"); 232 } 233 size()234 public int size() { 235 throw new RuntimeException("Stub!"); 236 } 237 contains(java.lang.Object o)238 public boolean contains(java.lang.Object o) { 239 throw new RuntimeException("Stub!"); 240 } 241 toArray()242 public java.lang.Object[] toArray() { 243 throw new RuntimeException("Stub!"); 244 } 245 toArray(T[] a)246 public <T> T[] toArray(T[] a) { 247 throw new RuntimeException("Stub!"); 248 } 249 toString()250 public java.lang.String toString() { 251 throw new RuntimeException("Stub!"); 252 } 253 clear()254 public void clear() { 255 throw new RuntimeException("Stub!"); 256 } 257 iterator()258 public java.util.Iterator<E> iterator() { 259 throw new RuntimeException("Stub!"); 260 } 261 descendingIterator()262 public java.util.Iterator<E> descendingIterator() { 263 throw new RuntimeException("Stub!"); 264 } 265 spliterator()266 public java.util.Spliterator<E> spliterator() { 267 throw new RuntimeException("Stub!"); 268 } 269 writeObject(java.io.ObjectOutputStream s)270 private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { 271 throw new RuntimeException("Stub!"); 272 } 273 readObject(java.io.ObjectInputStream s)274 private void readObject(java.io.ObjectInputStream s) 275 throws java.lang.ClassNotFoundException, java.io.IOException { 276 throw new RuntimeException("Stub!"); 277 } 278 279 private final int capacity; 280 281 { 282 capacity = 0; 283 } 284 285 private transient int count; 286 287 @UnsupportedAppUsage 288 transient Node<E> first; 289 290 transient Node<E> last; 291 292 @UnsupportedAppUsage 293 final java.util.concurrent.locks.ReentrantLock lock; 294 295 { 296 lock = null; 297 } 298 299 private final java.util.concurrent.locks.Condition notEmpty; 300 301 { 302 notEmpty = null; 303 } 304 305 private final java.util.concurrent.locks.Condition notFull; 306 307 { 308 notFull = null; 309 } 310 311 private static final long serialVersionUID = -387911632671998426L; // 0xfa9ddc6ce257fe26L 312 313 @SuppressWarnings({"unchecked", "deprecation", "all"}) 314 private abstract class AbstractItr implements java.util.Iterator<E> { 315 AbstractItr()316 AbstractItr() { 317 throw new RuntimeException("Stub!"); 318 } 319 firstNode()320 abstract Node<E> firstNode(); 321 nextNode( Node<E> n)322 abstract Node<E> nextNode( 323 Node<E> n); 324 succ( Node<E> n)325 private Node<E> succ( 326 Node<E> n) { 327 throw new RuntimeException("Stub!"); 328 } 329 advance()330 void advance() { 331 throw new RuntimeException("Stub!"); 332 } 333 hasNext()334 public boolean hasNext() { 335 throw new RuntimeException("Stub!"); 336 } 337 next()338 public E next() { 339 throw new RuntimeException("Stub!"); 340 } 341 remove()342 public void remove() { 343 throw new RuntimeException("Stub!"); 344 } 345 346 private Node<E> lastRet; 347 348 Node<E> next; 349 350 E nextItem; 351 } 352 353 @SuppressWarnings({"unchecked", "deprecation", "all"}) 354 private class DescendingItr extends AbstractItr { 355 DescendingItr()356 DescendingItr() { 357 throw new RuntimeException("Stub!"); 358 } 359 firstNode()360 Node<E> firstNode() { 361 throw new RuntimeException("Stub!"); 362 } 363 nextNode( Node<E> n)364 Node<E> nextNode( 365 Node<E> n) { 366 throw new RuntimeException("Stub!"); 367 } 368 } 369 370 @SuppressWarnings({"unchecked", "deprecation", "all"}) 371 private class Itr extends AbstractItr { 372 Itr()373 Itr() { 374 throw new RuntimeException("Stub!"); 375 } 376 firstNode()377 Node<E> firstNode() { 378 throw new RuntimeException("Stub!"); 379 } 380 nextNode( Node<E> n)381 Node<E> nextNode( 382 Node<E> n) { 383 throw new RuntimeException("Stub!"); 384 } 385 } 386 387 @SuppressWarnings({"unchecked", "deprecation", "all"}) 388 static final class LBDSpliterator<E> implements java.util.Spliterator<E> { 389 LBDSpliterator(java.util.concurrent.LinkedBlockingDeque<E> queue)390 LBDSpliterator(java.util.concurrent.LinkedBlockingDeque<E> queue) { 391 throw new RuntimeException("Stub!"); 392 } 393 estimateSize()394 public long estimateSize() { 395 throw new RuntimeException("Stub!"); 396 } 397 trySplit()398 public java.util.Spliterator<E> trySplit() { 399 throw new RuntimeException("Stub!"); 400 } 401 forEachRemaining(java.util.function.Consumer<? super E> action)402 public void forEachRemaining(java.util.function.Consumer<? super E> action) { 403 throw new RuntimeException("Stub!"); 404 } 405 tryAdvance(java.util.function.Consumer<? super E> action)406 public boolean tryAdvance(java.util.function.Consumer<? super E> action) { 407 throw new RuntimeException("Stub!"); 408 } 409 characteristics()410 public int characteristics() { 411 throw new RuntimeException("Stub!"); 412 } 413 414 static final int MAX_BATCH = 33554432; // 0x2000000 415 416 int batch; 417 418 Node<E> current; 419 420 long est; 421 422 boolean exhausted; 423 424 final java.util.concurrent.LinkedBlockingDeque<E> queue; 425 426 { 427 queue = null; 428 } 429 } 430 431 @SuppressWarnings({"unchecked", "deprecation", "all"}) 432 static final class Node<E> { 433 Node(E x)434 Node(E x) { 435 throw new RuntimeException("Stub!"); 436 } 437 438 E item; 439 440 Node<E> next; 441 442 Node<E> prev; 443 } 444 } 445