/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentLinkedDequeTest.java | 40 ConcurrentLinkedDeque<Integer> q = new ConcurrentLinkedDeque<Integer>(); in populatedDeque() local 41 assertTrue(q.isEmpty()); in populatedDeque() 43 assertTrue(q.offer(new Integer(i))); in populatedDeque() 44 assertFalse(q.isEmpty()); in populatedDeque() 45 assertEquals(n, q.size()); in populatedDeque() 46 return q; in populatedDeque() 97 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor6() local 99 assertEquals(ints[i], q.poll()); in testConstructor6() 106 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(); in testEmpty() local 107 assertTrue(q.isEmpty()); in testEmpty() [all …]
|
D | LinkedListTest.java | 36 LinkedList<Integer> q = new LinkedList<Integer>(); in populatedQueue() local 37 assertTrue(q.isEmpty()); in populatedQueue() 39 assertTrue(q.offer(new Integer(i))); in populatedQueue() 40 assertFalse(q.isEmpty()); in populatedQueue() 41 assertEquals(n, q.size()); in populatedQueue() 42 return q; in populatedQueue() 69 LinkedList q = new LinkedList(Arrays.asList(ints)); in testConstructor6() local 71 assertEquals(ints[i], q.poll()); in testConstructor6() 78 LinkedList q = new LinkedList(); in testEmpty() local 79 assertTrue(q.isEmpty()); in testEmpty() [all …]
|
D | ArrayDequeTest.java | 37 ArrayDeque<Integer> q = new ArrayDeque<Integer>(); in populatedDeque() local 38 assertTrue(q.isEmpty()); in populatedDeque() 40 assertTrue(q.offerLast(new Integer(i))); in populatedDeque() 41 assertFalse(q.isEmpty()); in populatedDeque() 42 assertEquals(n, q.size()); in populatedDeque() 43 return q; in populatedDeque() 93 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor6() local 95 assertEquals(ints[i], q.pollFirst()); in testConstructor6() 102 ArrayDeque q = new ArrayDeque(); in testEmpty() local 103 assertTrue(q.isEmpty()); in testEmpty() [all …]
|
D | LinkedTransferQueueTest.java | 117 LinkedTransferQueue q in testConstructor5() local 119 assertEquals(q.size(), intList.size()); in testConstructor5() 120 assertEquals(q.toString(), intList.toString()); in testConstructor5() 121 assertTrue(Arrays.equals(q.toArray(), in testConstructor5() 123 assertTrue(Arrays.equals(q.toArray(new Object[0]), in testConstructor5() 125 assertTrue(Arrays.equals(q.toArray(new Object[SIZE]), in testConstructor5() 128 assertEquals(ints[i], q.poll()); in testConstructor5() 136 BlockingQueue q = populatedQueue(SIZE); in testRemainingCapacity() local 138 assertEquals(Integer.MAX_VALUE, q.remainingCapacity()); in testRemainingCapacity() 139 assertEquals(SIZE - i, q.size()); in testRemainingCapacity() [all …]
|
D | ConcurrentLinkedQueueTest.java | 38 ConcurrentLinkedQueue<Integer> q = new ConcurrentLinkedQueue<Integer>(); in populatedQueue() local 39 assertTrue(q.isEmpty()); in populatedQueue() 41 assertTrue(q.offer(new Integer(i))); in populatedQueue() 42 assertFalse(q.isEmpty()); in populatedQueue() 43 assertEquals(n, q.size()); in populatedQueue() 44 return q; in populatedQueue() 94 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor6() local 96 assertEquals(ints[i], q.poll()); in testConstructor6() 103 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(); in testEmpty() local 104 assertTrue(q.isEmpty()); in testEmpty() [all …]
|
D | LinkedBlockingQueueTest.java | 61 LinkedBlockingQueue<Integer> q = in populatedQueue() local 63 assertTrue(q.isEmpty()); in populatedQueue() 65 assertTrue(q.offer(new Integer(i))); in populatedQueue() 66 assertFalse(q.isEmpty()); in populatedQueue() 67 assertEquals(0, q.remainingCapacity()); in populatedQueue() 68 assertEquals(n, q.size()); in populatedQueue() 69 return q; in populatedQueue() 134 LinkedBlockingQueue q = new LinkedBlockingQueue(Arrays.asList(ints)); in testConstructor6() local 136 assertEquals(ints[i], q.poll()); in testConstructor6() 143 LinkedBlockingQueue q = new LinkedBlockingQueue(2); in testEmptyFull() local [all …]
|
D | LinkedBlockingDequeTest.java | 58 LinkedBlockingDeque<Integer> q = in populatedDeque() local 60 assertTrue(q.isEmpty()); in populatedDeque() 62 assertTrue(q.offer(new Integer(i))); in populatedDeque() 63 assertFalse(q.isEmpty()); in populatedDeque() 64 assertEquals(0, q.remainingCapacity()); in populatedDeque() 65 assertEquals(n, q.size()); in populatedDeque() 66 return q; in populatedDeque() 73 LinkedBlockingDeque q = new LinkedBlockingDeque(); in testEmpty() local 74 assertTrue(q.isEmpty()); in testEmpty() 75 q.add(new Integer(1)); in testEmpty() [all …]
|
D | PriorityQueueTest.java | 44 PriorityQueue<Integer> q = new PriorityQueue<Integer>(n); in populatedQueue() local 45 assertTrue(q.isEmpty()); in populatedQueue() 47 assertTrue(q.offer(new Integer(i))); in populatedQueue() 49 assertTrue(q.offer(new Integer(i))); in populatedQueue() 50 assertFalse(q.isEmpty()); in populatedQueue() 51 assertEquals(n, q.size()); in populatedQueue() 52 return q; in populatedQueue() 112 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor6() local 114 assertEquals(ints[i], q.poll()); in testConstructor6() 122 PriorityQueue q = new PriorityQueue(SIZE, cmp); in testConstructor7() local [all …]
|
D | PriorityBlockingQueueTest.java | 69 PriorityBlockingQueue<Integer> q = in populatedQueue() local 71 assertTrue(q.isEmpty()); in populatedQueue() 73 assertTrue(q.offer(new Integer(i))); in populatedQueue() 75 assertTrue(q.offer(new Integer(i))); in populatedQueue() 76 assertFalse(q.isEmpty()); in populatedQueue() 77 assertEquals(Integer.MAX_VALUE, q.remainingCapacity()); in populatedQueue() 78 assertEquals(n, q.size()); in populatedQueue() 79 return q; in populatedQueue() 142 PriorityBlockingQueue q = new PriorityBlockingQueue(Arrays.asList(ints)); in testConstructor6() local 144 assertEquals(ints[i], q.poll()); in testConstructor6() [all …]
|
D | DelayQueueTest.java | 140 DelayQueue<PDelay> q = new DelayQueue<PDelay>(); in populatedQueue() local 141 assertTrue(q.isEmpty()); in populatedQueue() 143 assertTrue(q.offer(new PDelay(i))); in populatedQueue() 145 assertTrue(q.offer(new PDelay(i))); in populatedQueue() 146 assertFalse(q.isEmpty()); in populatedQueue() 147 assertEquals(Integer.MAX_VALUE, q.remainingCapacity()); in populatedQueue() 148 assertEquals(n, q.size()); in populatedQueue() 149 return q; in populatedQueue() 199 DelayQueue q = new DelayQueue(Arrays.asList(ints)); in testConstructor6() local 201 assertEquals(ints[i], q.poll()); in testConstructor6() [all …]
|
D | ArrayBlockingQueueTest.java | 61 ArrayBlockingQueue<Integer> q = new ArrayBlockingQueue<Integer>(n); in populatedQueue() local 62 assertTrue(q.isEmpty()); in populatedQueue() 64 assertTrue(q.offer(new Integer(i))); in populatedQueue() 65 assertFalse(q.isEmpty()); in populatedQueue() 66 assertEquals(0, q.remainingCapacity()); in populatedQueue() 67 assertEquals(n, q.size()); in populatedQueue() 68 return q; in populatedQueue() 145 ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE, true, elements); in testConstructor7() local 147 assertEquals(ints[i], q.poll()); in testConstructor7() 154 ArrayBlockingQueue q = new ArrayBlockingQueue(2); in testEmptyFull() local [all …]
|
D | ConcurrentSkipListSubSetTest.java | 41 ConcurrentSkipListSet<Integer> q = in populatedSet() local 43 assertTrue(q.isEmpty()); in populatedSet() 46 assertTrue(q.add(new Integer(i))); in populatedSet() 48 assertTrue(q.add(new Integer(i))); in populatedSet() 49 assertTrue(q.add(new Integer(-n))); in populatedSet() 50 assertTrue(q.add(new Integer(n))); in populatedSet() 51 NavigableSet s = q.subSet(new Integer(0), true, new Integer(n), false); in populatedSet() 61 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local 62 assertTrue(q.isEmpty()); in set5() 63 q.add(one); in set5() [all …]
|
D | TreeSubSetTest.java | 42 TreeSet<Integer> q = new TreeSet<Integer>(); in populatedSet() local 43 assertTrue(q.isEmpty()); in populatedSet() 46 assertTrue(q.add(new Integer(i))); in populatedSet() 48 assertTrue(q.add(new Integer(i))); in populatedSet() 49 assertTrue(q.add(new Integer(-n))); in populatedSet() 50 assertTrue(q.add(new Integer(n))); in populatedSet() 51 NavigableSet s = q.subSet(new Integer(0), true, new Integer(n), false); in populatedSet() 61 TreeSet q = new TreeSet(); in set5() local 62 assertTrue(q.isEmpty()); in set5() 63 q.add(one); in set5() [all …]
|
D | BlockingQueueTest.java | 70 final Queue q = emptyCollection(); in testOfferNull() local 72 q.offer(null); in testOfferNull() 81 final Collection q = emptyCollection(); in testAddNull() local 83 q.add(null); in testAddNull() 92 final BlockingQueue q = emptyCollection(); in testTimedOfferNull() local 95 q.offer(null, LONG_DELAY_MS, MILLISECONDS); in testTimedOfferNull() 105 final BlockingQueue q = emptyCollection(); 107 q.put(null); 116 final Collection q = emptyCollection(); 118 q.addAll(null); [all …]
|
D | SynchronousQueueTest.java | 61 final SynchronousQueue q = new SynchronousQueue(fair); in testEmptyFull() local 62 assertTrue(q.isEmpty()); in testEmptyFull() 63 assertEquals(0, q.size()); in testEmptyFull() 64 assertEquals(0, q.remainingCapacity()); in testEmptyFull() 65 assertFalse(q.offer(zero)); in testEmptyFull() 74 SynchronousQueue q = new SynchronousQueue(fair); in testOffer() local 75 assertFalse(q.offer(one)); in testOffer() 84 SynchronousQueue q = new SynchronousQueue(fair); in testAdd() local 85 assertEquals(0, q.remainingCapacity()); in testAdd() 87 q.add(one); in testAdd() [all …]
|
D | AbstractQueueTest.java | 56 Succeed q = new Succeed(); in testAddS() local 57 assertTrue(q.add(two)); in testAddS() 64 Fail q = new Fail(); in testAddF() local 66 q.add(one); in testAddF() 75 Succeed q = new Succeed(); in testAddNPE() local 77 q.add(null); in testAddNPE() 86 Succeed q = new Succeed(); in testRemoveS() local 87 q.remove(); in testRemoveS() 94 Fail q = new Fail(); in testRemoveF() local 96 q.remove(); in testRemoveF() [all …]
|
D | TreeSetTest.java | 51 TreeSet<Integer> q = new TreeSet<Integer>(); in populatedSet() local 52 assertTrue(q.isEmpty()); in populatedSet() 54 assertTrue(q.add(new Integer(i))); in populatedSet() 56 assertTrue(q.add(new Integer(i))); in populatedSet() 57 assertFalse(q.isEmpty()); in populatedSet() 58 assertEquals(n, q.size()); in populatedSet() 59 return q; in populatedSet() 66 TreeSet q = new TreeSet(); in set5() local 67 assertTrue(q.isEmpty()); in set5() 68 q.add(one); in set5() [all …]
|
D | ConcurrentSkipListSetTest.java | 46 ConcurrentSkipListSet<Integer> q = in populatedSet() local 48 assertTrue(q.isEmpty()); in populatedSet() 50 assertTrue(q.add(new Integer(i))); in populatedSet() 52 assertTrue(q.add(new Integer(i))); in populatedSet() 53 assertFalse(q.isEmpty()); in populatedSet() 54 assertEquals(n, q.size()); in populatedSet() 55 return q; in populatedSet() 62 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local 63 assertTrue(q.isEmpty()); in set5() 64 q.add(one); in set5() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | FutureTask.java | 365 for (WaitNode q; (q = waiters) != null;) { in finishCompletion() 366 if (U.compareAndSwapObject(this, WAITERS, q, null)) { in finishCompletion() 368 Thread t = q.thread; in finishCompletion() 370 q.thread = null; in finishCompletion() 373 WaitNode next = q.next; in finishCompletion() 376 q.next = null; // unlink to help gc in finishCompletion() 377 q = next; in finishCompletion() 405 WaitNode q = null; in awaitDone() local 410 if (q != null) in awaitDone() 411 q.thread = null; in awaitDone() [all …]
|
D | ConcurrentLinkedDeque.java | 356 for (Node<E> h = head, p = h, q;;) { in linkFirst() 357 if ((q = p.prev) != null && in linkFirst() 358 (q = (p = q).prev) != null) in linkFirst() 361 p = (h != (h = head)) ? h : q; in linkFirst() 388 for (Node<E> t = tail, p = t, q;;) { in linkLast() 389 if ((q = p.next) != null && in linkLast() 390 (q = (p = q).next) != null) in linkLast() 393 p = (t != (t = tail)) ? t : q; in linkLast() 460 Node<E> q = p.prev; in unlink() local 461 if (q == null) { in unlink() [all …]
|
D | DelayQueue.java | 80 private final PriorityQueue<E> q = new PriorityQueue<E>(); field in DelayQueue 146 q.offer(e); in offer() 147 if (q.peek() == e) { in offer() 193 E first = q.peek(); in poll() 196 : q.poll(); in poll() 214 E first = q.peek(); in take() 220 return q.poll(); in take() 237 if (leader == null && q.peek() != null) in take() 259 E first = q.peek(); in poll() 268 return q.poll(); in poll() [all …]
|
D | ConcurrentLinkedQueue.java | 314 Node<E> q = p.next; in offer() local 315 if (q == null) { in offer() 327 else if (p == q) in offer() 335 p = (p != t && t != (t = tail)) ? t : q; in offer() 342 for (Node<E> h = head, p = h, q;;) { in poll() 349 updateHead(h, ((q = p.next) != null) ? q : p); in poll() 352 else if ((q = p.next) == null) { in poll() 356 else if (p == q) in poll() 359 p = q; in poll() 367 for (Node<E> h = head, p = h, q;;) { in peek() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | URI.java | 2319 int q = segs[i]; // Current segment in join() local 2320 if (q == -1) in join() 2324 if (p == q) { in join() 2332 } else if (p < q) { in join() 2334 while ((q <= end) && (path[q] != '\0')) in join() 2335 path[p++] = path[q++]; in join() 2336 if (q <= end) { in join() 2393 int q = segs[j]; in removeDots() local 2394 if (!((path[q] == '.') in removeDots() 2395 && (path[q + 1] == '.') in removeDots() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | ArraysParallelSortHelpers.java | 132 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local 135 Relay rc = new Relay(new Merger<T>(fc, a, w, b+h, q, in compute() 138 new Sorter<T>(rc, a, w, b+h, q, wb+h, g, c).fork();; in compute() 139 Relay bc = new Relay(new Merger<T>(fc, a, w, b, q, in compute() 140 b+q, h-q, wb, g, c)); in compute() 141 new Sorter<T>(bc, a, w, b+q, h-q, wb+q, g, c).fork(); in compute() 143 n = q; in compute() 250 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local 253 Relay rc = new Relay(new Merger(fc, a, w, b+h, q, in compute() 256 new Sorter(rc, a, w, b+h, q, wb+h, g).fork();; in compute() [all …]
|
/libcore/ojluni/src/main/java/java/security/spec/ |
D | DSAParameterSpec.java | 45 BigInteger q; field in DSAParameterSpec 57 public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) { in DSAParameterSpec() argument 59 this.q = q; in DSAParameterSpec() 78 return this.q; in getQ()
|