Home
last modified time | relevance | path

Searched refs:q (Results 1 – 25 of 60) sorted by relevance

123

/libcore/luni/src/test/java/tests/api/java/util/concurrent/
DLinkedBlockingDequeTest.java25 LinkedBlockingDeque q = new LinkedBlockingDeque(n); in populatedDeque() local
26 assertTrue(q.isEmpty()); in populatedDeque()
28 assertTrue(q.offer(new Integer(i))); in populatedDeque()
29 assertFalse(q.isEmpty()); in populatedDeque()
30 assertEquals(0, q.remainingCapacity()); in populatedDeque()
31 assertEquals(n, q.size()); in populatedDeque()
32 return q; in populatedDeque()
39 LinkedBlockingDeque q = new LinkedBlockingDeque(); in testEmpty() local
40 assertTrue(q.isEmpty()); in testEmpty()
41 q.add(new Integer(1)); in testEmpty()
[all …]
DArrayDequeTest.java23 ArrayDeque q = new ArrayDeque(); in populatedDeque() local
24 assertTrue(q.isEmpty()); in populatedDeque()
26 assertTrue(q.offerLast(new Integer(i))); in populatedDeque()
27 assertFalse(q.isEmpty()); in populatedDeque()
28 assertEquals(n, q.size()); in populatedDeque()
29 return q; in populatedDeque()
44 ArrayDeque q = new ArrayDeque((Collection)null); in testConstructor3() local
57 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor6() local
59 assertEquals(ints[i], q.pollFirst()); in testConstructor6()
66 ArrayDeque q = new ArrayDeque(); in testEmpty() local
[all …]
DConcurrentLinkedQueueTest.java26 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(); 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 …]
DLinkedBlockingQueueTest.java28 LinkedBlockingQueue q = new LinkedBlockingQueue(n); in populatedQueue() local
29 assertTrue(q.isEmpty()); in populatedQueue()
31 assertTrue(q.offer(new Integer(i))); in populatedQueue()
32 assertFalse(q.isEmpty()); in populatedQueue()
33 assertEquals(0, q.remainingCapacity()); in populatedQueue()
34 assertEquals(n, q.size()); in populatedQueue()
35 return q; in populatedQueue()
52 LinkedBlockingQueue q = new LinkedBlockingQueue(0); in testConstructor2() local
62 LinkedBlockingQueue q = new LinkedBlockingQueue(null); in testConstructor3() local
73 LinkedBlockingQueue q = new LinkedBlockingQueue(Arrays.asList(ints)); in testConstructor4() local
[all …]
DLinkedListTest.java25 LinkedList q = new LinkedList(); 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
61 LinkedList q = new LinkedList(Arrays.asList(ints)); in testConstructor6() local
63 assertEquals(ints[i], q.poll()); in testConstructor6()
72 LinkedList q = new LinkedList(); in testEmpty() local
[all …]
DArrayBlockingQueueTest.java27 ArrayBlockingQueue q = new ArrayBlockingQueue(n); in populatedQueue() local
28 assertTrue(q.isEmpty()); in populatedQueue()
30 assertTrue(q.offer(new Integer(i))); in populatedQueue()
31 assertFalse(q.isEmpty()); in populatedQueue()
32 assertEquals(0, q.remainingCapacity()); in populatedQueue()
33 assertEquals(n, q.size()); in populatedQueue()
34 return q; in populatedQueue()
49 ArrayBlockingQueue q = new ArrayBlockingQueue(0); in testConstructor2() local
59 ArrayBlockingQueue q = new ArrayBlockingQueue(1, true, null); in testConstructor3() local
70 ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE, false, Arrays.asList(ints)); in testConstructor4() local
[all …]
DPriorityQueueTest.java32 PriorityQueue q = new PriorityQueue(n); in populatedQueue() local
33 assertTrue(q.isEmpty()); in populatedQueue()
35 assertTrue(q.offer(new Integer(i))); in populatedQueue()
37 assertTrue(q.offer(new Integer(i))); in populatedQueue()
38 assertFalse(q.isEmpty()); in populatedQueue()
39 assertEquals(n, q.size()); in populatedQueue()
40 return q; in populatedQueue()
55 PriorityQueue q = new PriorityQueue(0); in testConstructor2() local
65 PriorityQueue q = new PriorityQueue((Collection)null); in testConstructor3() local
76 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor4() local
[all …]
DDelayQueueTest.java111 DelayQueue q = new DelayQueue(); in populatedQueue() local
112 assertTrue(q.isEmpty()); in populatedQueue()
114 assertTrue(q.offer(new PDelay(i))); in populatedQueue()
116 assertTrue(q.offer(new PDelay(i))); in populatedQueue()
117 assertFalse(q.isEmpty()); in populatedQueue()
118 assertEquals(NOCAP, q.remainingCapacity()); in populatedQueue()
119 assertEquals(n, q.size()); in populatedQueue()
120 return q; in populatedQueue()
135 DelayQueue q = new DelayQueue(null); in testConstructor3() local
146 DelayQueue q = new DelayQueue(Arrays.asList(ints)); in testConstructor4() local
[all …]
DPriorityBlockingQueueTest.java36 PriorityBlockingQueue q = new PriorityBlockingQueue(n); in populatedQueue() local
37 assertTrue(q.isEmpty()); in populatedQueue()
39 assertTrue(q.offer(new Integer(i))); in populatedQueue()
41 assertTrue(q.offer(new Integer(i))); in populatedQueue()
42 assertFalse(q.isEmpty()); in populatedQueue()
43 assertEquals(NOCAP, q.remainingCapacity()); in populatedQueue()
44 assertEquals(n, q.size()); in populatedQueue()
45 return q; in populatedQueue()
60 PriorityBlockingQueue q = new PriorityBlockingQueue(0); in testConstructor2() local
70 PriorityBlockingQueue q = new PriorityBlockingQueue(null); in testConstructor3() local
[all …]
DSynchronousQueueTest.java26 SynchronousQueue q = new SynchronousQueue(); in testEmptyFull() local
27 assertTrue(q.isEmpty()); in testEmptyFull()
28 assertEquals(0, q.size()); in testEmptyFull()
29 assertEquals(0, q.remainingCapacity()); in testEmptyFull()
30 assertFalse(q.offer(zero)); in testEmptyFull()
37 SynchronousQueue q = new SynchronousQueue(true); in testFairEmptyFull() local
38 assertTrue(q.isEmpty()); in testFairEmptyFull()
39 assertEquals(0, q.size()); in testFairEmptyFull()
40 assertEquals(0, q.remainingCapacity()); in testFairEmptyFull()
41 assertFalse(q.offer(zero)); in testFairEmptyFull()
[all …]
DConcurrentSkipListSubSetTest.java30 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in populatedSet() local
31 assertTrue(q.isEmpty()); in populatedSet()
34 assertTrue(q.add(new Integer(i))); in populatedSet()
36 assertTrue(q.add(new Integer(i))); in populatedSet()
37 assertTrue(q.add(new Integer(-n))); in populatedSet()
38 assertTrue(q.add(new Integer(n))); in populatedSet()
39 NavigableSet s = q.subSet(new Integer(0), true, new Integer(n), false); in populatedSet()
49 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local
50 assertTrue(q.isEmpty()); in set5()
51 q.add(one); in set5()
[all …]
DAbstractQueueTest.java48 Succeed q = new Succeed(); in testAddS() local
49 assertTrue(q.add(two)); in testAddS()
56 Fail q = new Fail(); in testAddF() local
58 q.add(one); in testAddF()
67 Succeed q = new Succeed(); in testAddNPE() local
69 q.add(null); in testAddNPE()
78 Succeed q = new Succeed(); in testRemoveS() local
79 q.remove(); in testRemoveS()
86 Fail q = new Fail(); in testRemoveF() local
88 q.remove(); in testRemoveF()
[all …]
DConcurrentSkipListSetTest.java30 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in populatedSet() local
31 assertTrue(q.isEmpty()); in populatedSet()
33 assertTrue(q.add(new Integer(i))); in populatedSet()
35 assertTrue(q.add(new Integer(i))); in populatedSet()
36 assertFalse(q.isEmpty()); in populatedSet()
37 assertEquals(n, q.size()); in populatedSet()
38 return q; in populatedSet()
45 ConcurrentSkipListSet q = new ConcurrentSkipListSet(); in set5() local
46 assertTrue(q.isEmpty()); in set5()
47 q.add(one); in set5()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DPriorityBlockingQueue.java81 private final PriorityQueue<E> q; field in PriorityBlockingQueue
91 q = new PriorityQueue<E>(); in PriorityBlockingQueue()
104 q = new PriorityQueue<E>(initialCapacity, null); in PriorityBlockingQueue()
121 q = new PriorityQueue<E>(initialCapacity, comparator); in PriorityBlockingQueue()
141 q = new PriorityQueue<E>(c); in PriorityBlockingQueue()
172 boolean ok = q.offer(e); in offer()
216 return q.poll(); in poll()
227 while (q.size() == 0) in take()
233 E x = q.poll(); in take()
247 E x = q.poll(); in poll()
[all …]
DDelayQueue.java50 private final PriorityQueue<E> q = new PriorityQueue<E>(); field in DelayQueue
116 q.offer(e); in offer()
117 if (q.peek() == e) { in offer()
163 E first = q.peek(); in poll()
167 return q.poll(); in poll()
185 E first = q.peek(); in take()
191 return q.poll(); in take()
207 if (leader == null && q.peek() != null) in take()
229 E first = q.peek(); in poll()
238 return q.poll(); in poll()
[all …]
DConcurrentLinkedDeque.java262 Node<E> q = p.prev; in linkFirst() local
263 if (q == null) { in linkFirst()
275 else if (p == q) in linkFirst()
278 p = q; in linkFirst()
293 Node<E> q = p.next; in linkLast() local
294 if (q == null) { in linkLast()
306 else if (p == q) in linkLast()
309 p = q; in linkLast()
375 Node<E> q = p.prev; in unlink() local
376 if (q == null) { in unlink()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
DSHA1withDSA_SignatureImpl.java80 BigInteger p, q, x; in engineInitSign() local
90 q = params.getQ(); in engineInitSign()
98 if (q.signum() != 1 && q.bitLength() != 160) { in engineInitSign()
101 if (x.signum() != 1 || x.compareTo(q) != -1) { in engineInitSign()
123 BigInteger p, q, y; in engineInitVerify() local
133 q = params.getQ(); in engineInitVerify()
141 if (q.signum() != 1 || q.bitLength() != 160) { in engineInitVerify()
190 BigInteger p, q, g, x; in engineSign() local
211 q = params.getQ(); in engineSign()
226 if (k.compareTo(q) != -1) { in engineSign()
[all …]
DThreeIntegerSequence.java33 byte[] p, q, g; field in ThreeIntegerSequence
37 ThreeIntegerSequence(byte[] p, byte[] q, byte[] g) { in ThreeIntegerSequence() argument
40 this.q = q; in ThreeIntegerSequence()
69 values[1] = mySeq.q;
DDSAPublicKeyImpl.java57 private BigInteger y, g, p, q; field in DSAPublicKeyImpl
73 q = keySpec.getQ(); in DSAPublicKeyImpl()
77 .toByteArray(), q.toByteArray(), g.toByteArray()); in DSAPublicKeyImpl()
89 params = (DSAParams) (new DSAParameterSpec(p, q, g)); in DSAPublicKeyImpl()
136 q = new BigInteger(threeInts.q); in DSAPublicKeyImpl()
138 params = (DSAParams) (new DSAParameterSpec(p, q, g)); in DSAPublicKeyImpl()
168 params = new DSAParameterSpec(p, q, g); in readObject()
DDSAPrivateKeyImpl.java55 private BigInteger x, g, p, q; field in DSAPrivateKeyImpl
72 q = keySpec.getQ(); in DSAPrivateKeyImpl()
75 .toByteArray(), q.toByteArray(), g.toByteArray()); in DSAPrivateKeyImpl()
87 params = new DSAParameterSpec(p, q, g); in DSAPrivateKeyImpl()
133 q = new BigInteger(threeInts.q); in DSAPrivateKeyImpl()
135 params = new DSAParameterSpec(p, q, g); in DSAPrivateKeyImpl()
156 params = new DSAParameterSpec(p, q, g); in readObject()
/libcore/luni/src/main/java/java/security/spec/
DDSAParameterSpec.java30 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()
DDSAPublicKeySpec.java31 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()
DDSAPrivateKeySpec.java31 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()
/libcore/luni/src/main/java/java/lang/
DIntegralToString.java143 int q = i / radix; in intToString()
144 buf[--cursor] = DIGITS[radix * q - i]; in intToString()
145 i = q; in intToString()
215 int q = (int) ((0x51EB851FL * i) >>> 37);
216 int r = i - 100*q;
219 i = q;
225 int q = (0xCCCD * i) >>> 19;
226 int r = i - 10*q;
228 i = q;
277 long q = v / radix;
[all …]
/libcore/luni/src/test/java/tests/security/interfaces/
DDSAParamsTest.java31 private final BigInteger q = BigInteger.TEN; field in DSAParamsTest
45 DSAParams params = new DSAParameterSpec(p, q, g); in test_getG()
60 DSAParams params = new DSAParameterSpec(p, q, g); in test_getP()
75 DSAParams params = new DSAParameterSpec(p, q, g); in test_getQ()
76 assertEquals("Invalid Q", q, params.getQ()); in test_getQ()

123