/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentLinkedDequeTest.java | 27 ConcurrentLinkedDeque<Integer> q = new ConcurrentLinkedDeque<Integer>(); in populatedDeque() local 28 assertTrue(q.isEmpty()); in populatedDeque() 30 assertTrue(q.offer(new Integer(i))); in populatedDeque() 31 assertFalse(q.isEmpty()); in populatedDeque() 32 assertEquals(n, q.size()); in populatedDeque() 33 return q; in populatedDeque() 49 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque((Collection)null); in testConstructor3() local 60 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor4() local 73 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor5() local 85 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor6() local [all …]
|
D | LinkedListTest.java | 25 LinkedList<Integer> q = new LinkedList<Integer>(); in populatedQueue() local 26 assertTrue(q.isEmpty()); in populatedQueue() 28 assertTrue(q.offer(new Integer(i))); in populatedQueue() 29 assertFalse(q.isEmpty()); in populatedQueue() 30 assertEquals(n, q.size()); in populatedQueue() 31 return q; in populatedQueue() 46 LinkedList q = new LinkedList((Collection)null); in testConstructor3() local 58 LinkedList q = new LinkedList(Arrays.asList(ints)); in testConstructor6() local 60 assertEquals(ints[i], q.poll()); in testConstructor6() 67 LinkedList q = new LinkedList(); in testEmpty() local [all …]
|
D | ConcurrentLinkedQueueTest.java | 26 ConcurrentLinkedQueue<Integer> q = new ConcurrentLinkedQueue<Integer>(); in populatedQueue() local 27 assertTrue(q.isEmpty()); in populatedQueue() 29 assertTrue(q.offer(new Integer(i))); in populatedQueue() 30 assertFalse(q.isEmpty()); in populatedQueue() 31 assertEquals(n, q.size()); in populatedQueue() 32 return q; in populatedQueue() 47 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue((Collection)null); in testConstructor3() local 58 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor4() local 71 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor5() local 83 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor6() local [all …]
|
D | ArrayDequeTest.java | 26 ArrayDeque<Integer> q = new ArrayDeque<Integer>(); in populatedDeque() local 27 assertTrue(q.isEmpty()); in populatedDeque() 29 assertTrue(q.offerLast(new Integer(i))); in populatedDeque() 30 assertFalse(q.isEmpty()); in populatedDeque() 31 assertEquals(n, q.size()); in populatedDeque() 32 return q; in populatedDeque() 47 ArrayDeque q = new ArrayDeque((Collection)null); in testConstructor3() local 58 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor4() local 71 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor5() local 83 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor6() local [all …]
|
D | LinkedBlockingDequeTest.java | 31 LinkedBlockingDeque<Integer> q = in populatedDeque() local 33 assertTrue(q.isEmpty()); in populatedDeque() 35 assertTrue(q.offer(new Integer(i))); in populatedDeque() 36 assertFalse(q.isEmpty()); in populatedDeque() 37 assertEquals(0, q.remainingCapacity()); in populatedDeque() 38 assertEquals(n, q.size()); in populatedDeque() 39 return q; in populatedDeque() 46 LinkedBlockingDeque q = new LinkedBlockingDeque(); in testEmpty() local 47 assertTrue(q.isEmpty()); in testEmpty() 48 q.add(new Integer(1)); in testEmpty() [all …]
|
D | LinkedTransferQueueTest.java | 89 LinkedTransferQueue q in testConstructor5() local 91 assertEquals(q.size(), intList.size()); in testConstructor5() 92 assertEquals(q.toString(), intList.toString()); in testConstructor5() 93 assertTrue(Arrays.equals(q.toArray(), in testConstructor5() 95 assertTrue(Arrays.equals(q.toArray(new Object[0]), in testConstructor5() 97 assertTrue(Arrays.equals(q.toArray(new Object[SIZE]), in testConstructor5() 100 assertEquals(ints[i], q.poll()); in testConstructor5() 108 LinkedTransferQueue<Integer> q = populatedQueue(SIZE); in testRemainingCapacity() local 110 assertEquals(Integer.MAX_VALUE, q.remainingCapacity()); in testRemainingCapacity() 111 assertEquals(SIZE - i, q.size()); in testRemainingCapacity() [all …]
|
D | PriorityQueueTest.java | 33 PriorityQueue<Integer> q = new PriorityQueue<Integer>(n); in populatedQueue() local 34 assertTrue(q.isEmpty()); in populatedQueue() 36 assertTrue(q.offer(new Integer(i))); in populatedQueue() 38 assertTrue(q.offer(new Integer(i))); in populatedQueue() 39 assertFalse(q.isEmpty()); in populatedQueue() 40 assertEquals(n, q.size()); in populatedQueue() 41 return q; in populatedQueue() 56 PriorityQueue q = new PriorityQueue(0); in testConstructor2() local 66 PriorityQueue q = new PriorityQueue((Collection)null); in testConstructor3() local 77 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor4() local [all …]
|
D | ArrayBlockingQueueTest.java | 32 ArrayBlockingQueue<Integer> q = new ArrayBlockingQueue<Integer>(n); in populatedQueue() local 33 assertTrue(q.isEmpty()); in populatedQueue() 35 assertTrue(q.offer(new Integer(i))); in populatedQueue() 36 assertFalse(q.isEmpty()); in populatedQueue() 37 assertEquals(0, q.remainingCapacity()); in populatedQueue() 38 assertEquals(n, q.size()); in populatedQueue() 39 return q; in populatedQueue() 116 ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE, true, elements); in testConstructor7() local 118 assertEquals(ints[i], q.poll()); in testConstructor7() 125 ArrayBlockingQueue q = new ArrayBlockingQueue(2); in testEmptyFull() local [all …]
|
D | LinkedBlockingQueueTest.java | 32 LinkedBlockingQueue<Integer> q = in populatedQueue() local 34 assertTrue(q.isEmpty()); in populatedQueue() 36 assertTrue(q.offer(new Integer(i))); in populatedQueue() 37 assertFalse(q.isEmpty()); in populatedQueue() 38 assertEquals(0, q.remainingCapacity()); in populatedQueue() 39 assertEquals(n, q.size()); in populatedQueue() 40 return q; in populatedQueue() 105 LinkedBlockingQueue q = new LinkedBlockingQueue(Arrays.asList(ints)); in testConstructor6() local 107 assertEquals(ints[i], q.poll()); in testConstructor6() 114 LinkedBlockingQueue q = new LinkedBlockingQueue(2); in testEmptyFull() local [all …]
|
D | PriorityBlockingQueueTest.java | 42 PriorityBlockingQueue<Integer> q = in populatedQueue() local 44 assertTrue(q.isEmpty()); in populatedQueue() 46 assertTrue(q.offer(new Integer(i))); in populatedQueue() 48 assertTrue(q.offer(new Integer(i))); in populatedQueue() 49 assertFalse(q.isEmpty()); in populatedQueue() 50 assertEquals(NOCAP, q.remainingCapacity()); in populatedQueue() 51 assertEquals(n, q.size()); in populatedQueue() 52 return q; in populatedQueue() 114 PriorityBlockingQueue q = new PriorityBlockingQueue(Arrays.asList(ints)); in testConstructor6() local 116 assertEquals(ints[i], q.poll()); in testConstructor6() [all …]
|
D | DelayQueueTest.java | 116 DelayQueue<PDelay> q = new DelayQueue<PDelay>(); in populatedQueue() local 117 assertTrue(q.isEmpty()); in populatedQueue() 119 assertTrue(q.offer(new PDelay(i))); in populatedQueue() 121 assertTrue(q.offer(new PDelay(i))); in populatedQueue() 122 assertFalse(q.isEmpty()); in populatedQueue() 123 assertEquals(NOCAP, q.remainingCapacity()); in populatedQueue() 124 assertEquals(n, q.size()); in populatedQueue() 125 return q; in populatedQueue() 140 DelayQueue q = new DelayQueue(null); in testConstructor3() local 151 DelayQueue q = new DelayQueue(Arrays.asList(ints)); in testConstructor4() local [all …]
|
D | ConcurrentSkipListSubSetTest.java | 35 ConcurrentSkipListSet<Integer> q = in populatedSet() local 37 assertTrue(q.isEmpty()); in populatedSet() 40 assertTrue(q.add(new Integer(i))); in populatedSet() 42 assertTrue(q.add(new Integer(i))); in populatedSet() 43 assertTrue(q.add(new Integer(-n))); in populatedSet() 44 assertTrue(q.add(new Integer(n))); in populatedSet() 45 NavigableSet s = q.subSet(new Integer(0), true, new Integer(n), false); in populatedSet() 55 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local 56 assertTrue(q.isEmpty()); in set5() 57 q.add(one); in set5() [all …]
|
D | TreeSubSetTest.java | 31 TreeSet<Integer> q = new TreeSet<Integer>(); in populatedSet() local 32 assertTrue(q.isEmpty()); in populatedSet() 35 assertTrue(q.add(new Integer(i))); in populatedSet() 37 assertTrue(q.add(new Integer(i))); in populatedSet() 38 assertTrue(q.add(new Integer(-n))); in populatedSet() 39 assertTrue(q.add(new Integer(n))); in populatedSet() 40 NavigableSet s = q.subSet(new Integer(0), true, new Integer(n), false); in populatedSet() 50 TreeSet q = new TreeSet(); in set5() local 51 assertTrue(q.isEmpty()); in set5() 52 q.add(one); in set5() [all …]
|
D | BlockingQueueTest.java | 58 final Queue q = emptyCollection(); in testOfferNull() local 60 q.offer(null); in testOfferNull() 69 final Collection q = emptyCollection(); in testAddNull() local 71 q.add(null); in testAddNull() 80 final BlockingQueue q = emptyCollection(); in testTimedOfferNull() local 83 q.offer(null, LONG_DELAY_MS, MILLISECONDS); in testTimedOfferNull() 93 final BlockingQueue q = emptyCollection(); 95 q.put(null); 104 final Collection q = emptyCollection(); 106 q.addAll(null); [all …]
|
D | SynchronousQueueTest.java | 33 final SynchronousQueue q = new SynchronousQueue(fair); in testEmptyFull() local 34 assertTrue(q.isEmpty()); in testEmptyFull() 35 assertEquals(0, q.size()); in testEmptyFull() 36 assertEquals(0, q.remainingCapacity()); in testEmptyFull() 37 assertFalse(q.offer(zero)); in testEmptyFull() 46 SynchronousQueue q = new SynchronousQueue(fair); in testOffer() local 47 assertFalse(q.offer(one)); in testOffer() 56 SynchronousQueue q = new SynchronousQueue(fair); in testAdd() local 57 assertEquals(0, q.remainingCapacity()); in testAdd() 59 q.add(one); in testAdd() [all …]
|
D | AbstractQueueTest.java | 45 Succeed q = new Succeed(); in testAddS() local 46 assertTrue(q.add(two)); in testAddS() 53 Fail q = new Fail(); in testAddF() local 55 q.add(one); in testAddF() 64 Succeed q = new Succeed(); in testAddNPE() local 66 q.add(null); in testAddNPE() 75 Succeed q = new Succeed(); in testRemoveS() local 76 q.remove(); in testRemoveS() 83 Fail q = new Fail(); in testRemoveF() local 85 q.remove(); in testRemoveF() [all …]
|
D | TreeSetTest.java | 40 TreeSet<Integer> q = new TreeSet<Integer>(); in populatedSet() local 41 assertTrue(q.isEmpty()); in populatedSet() 43 assertTrue(q.add(new Integer(i))); in populatedSet() 45 assertTrue(q.add(new Integer(i))); in populatedSet() 46 assertFalse(q.isEmpty()); in populatedSet() 47 assertEquals(n, q.size()); in populatedSet() 48 return q; in populatedSet() 55 TreeSet q = new TreeSet(); in set5() local 56 assertTrue(q.isEmpty()); in set5() 57 q.add(one); in set5() [all …]
|
D | ConcurrentSkipListSetTest.java | 35 ConcurrentSkipListSet<Integer> q = in populatedSet() local 37 assertTrue(q.isEmpty()); in populatedSet() 39 assertTrue(q.add(new Integer(i))); in populatedSet() 41 assertTrue(q.add(new Integer(i))); in populatedSet() 42 assertFalse(q.isEmpty()); in populatedSet() 43 assertEquals(n, q.size()); in populatedSet() 44 return q; in populatedSet() 51 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local 52 assertTrue(q.isEmpty()); in set5() 53 q.add(one); in set5() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | FutureTask.java | 337 for (WaitNode q; (q = waiters) != null;) { in finishCompletion() 338 if (UNSAFE.compareAndSwapObject(this, waitersOffset, q, null)) { in finishCompletion() 340 Thread t = q.thread; in finishCompletion() 342 q.thread = null; in finishCompletion() 345 WaitNode next = q.next; in finishCompletion() 348 q.next = null; // unlink to help gc in finishCompletion() 349 q = next; in finishCompletion() 370 WaitNode q = null; in awaitDone() local 374 removeWaiter(q); in awaitDone() 380 if (q != null) in awaitDone() [all …]
|
D | ConcurrentLinkedDeque.java | 330 for (Node<E> h = head, p = h, q;;) { in linkFirst() 331 if ((q = p.prev) != null && in linkFirst() 332 (q = (p = q).prev) != null) in linkFirst() 335 p = (h != (h = head)) ? h : q; in linkFirst() 363 for (Node<E> t = tail, p = t, q;;) { in linkLast() 364 if ((q = p.next) != null && in linkLast() 365 (q = (p = q).next) != null) in linkLast() 368 p = (t != (t = tail)) ? t : q; in linkLast() 435 Node<E> q = p.prev; in unlink() local 436 if (q == null) { in unlink() [all …]
|
D | DelayQueue.java | 45 private final PriorityQueue<E> q = new PriorityQueue<E>(); field in DelayQueue 111 q.offer(e); in offer() 112 if (q.peek() == e) { in offer() 158 E first = q.peek(); in poll() 162 return q.poll(); in poll() 180 E first = q.peek(); in take() 186 return q.poll(); in take() 203 if (leader == null && q.peek() != null) in take() 225 E first = q.peek(); in poll() 234 return q.poll(); in poll() [all …]
|
/libcore/luni/src/main/java/java/security/spec/ |
D | DSAParameterSpec.java | 30 private final BigInteger q; field in DSAParameterSpec 45 public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) { in DSAParameterSpec() argument 47 this.q = q; in DSAParameterSpec() 75 return q; in getQ()
|
D | DSAPrivateKeySpec.java | 31 private final BigInteger q; field in DSAPrivateKeySpec 49 BigInteger q, BigInteger g) { in DSAPrivateKeySpec() argument 52 this.q = q; in DSAPrivateKeySpec() 80 return q; in getQ()
|
D | DSAPublicKeySpec.java | 31 private final BigInteger q; field in DSAPublicKeySpec 49 BigInteger q, BigInteger g) { in DSAPublicKeySpec() argument 52 this.q = q; in DSAPublicKeySpec() 80 return q; in getQ()
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
D | DSAParamsTest.java | 27 private final BigInteger q = BigInteger.TEN; field in DSAParamsTest 35 DSAParams params = new DSAParameterSpec(p, q, g); in test_getG() 44 DSAParams params = new DSAParameterSpec(p, q, g); in test_getP() 53 DSAParams params = new DSAParameterSpec(p, q, g); in test_getQ() 54 assertEquals("Invalid Q", q, params.getQ()); in test_getQ()
|