Home
last modified time | relevance | path

Searched refs:pq (Results 1 – 7 of 7) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DPriorityQueueTest.java36 var pq = new PriorityQueue<Integer>(); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsEmpty() local
38 assertThrows(NullPointerException.class, () -> pq.forEach(null)); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsEmpty()
43 var pq = new PriorityQueue<Integer>(); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsNotEmpty() local
45 pq.add(10); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsNotEmpty()
47 assertThrows(NullPointerException.class, () -> pq.forEach(null)); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsNotEmpty()
52 var pq = new PriorityQueue<Integer>(); in forEach_followPriorityQueueInArbitraryOrder() local
54 pq.add(10); in forEach_followPriorityQueueInArbitraryOrder()
55 pq.add(0); in forEach_followPriorityQueueInArbitraryOrder()
56 pq.add(42); in forEach_followPriorityQueueInArbitraryOrder()
57 pq.add(-10); in forEach_followPriorityQueueInArbitraryOrder()
[all …]
/libcore/ojluni/src/test/java/util/PriorityQueue/
DPriorityQueueSort.java69 Queue<Integer> pq = new PriorityQueue<>(n, new MyComparator()); in main() local
71 pq.add(i.next()); in main()
74 while (!pq.isEmpty()) in main()
75 recons.add(pq.remove()); in main()
80 pq = new PriorityQueue<>(shuffled); in main()
81 while (!pq.isEmpty()) in main()
82 recons.add(pq.remove()); in main()
87 pq = new PriorityQueue<>(shuffled); in main()
88 for (Iterator<Integer> i = pq.iterator(); i.hasNext(); ) in main()
92 while (!pq.isEmpty()) in main()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DPriorityQueueBenchmark.java31 private PriorityQueue<Integer> pq; field in PriorityQueueBenchmark
38 pq = new PriorityQueue<Integer>(); in setUp()
52 pq.add(allElements.get(i)); in setUp()
57 pq.add(allElements.get(i)); in setUp()
63 usepq = new PriorityQueue<Integer>(pq); in setUp()
79 usepq = new PriorityQueue<Integer>(pq); in timeRemove()
/libcore/ojluni/annotations/hiddenapi/java/util/
DPriorityQueue.java237 java.util.PriorityQueue<E> pq, int origin, int fence, int expectedModCount) { in PriorityQueueSpliterator() argument
271 private final java.util.PriorityQueue<E> pq; field in PriorityQueue.PriorityQueueSpliterator
274 pq = null;
/libcore/ojluni/src/main/java/sun/security/x509/
DPolicyInformation.java277 for (PolicyQualifierInfo pq : policyQualifiers) { in encode()
278 tmp2.write(pq.getEncoded()); in encode()
/libcore/ojluni/src/main/java/java/util/
DPriorityQueue.java209 PriorityQueue<? extends E> pq = (PriorityQueue<? extends E>) c; in PriorityQueue() local
210 this.comparator = (Comparator<? super E>) pq.comparator(); in PriorityQueue()
211 initFromPriorityQueue(pq); in PriorityQueue()
/libcore/ojluni/src/main/java/java/util/concurrent/
DPriorityBlockingQueue.java251 PriorityBlockingQueue<? extends E> pq = in PriorityBlockingQueue() local
253 this.comparator = (Comparator<? super E>) pq.comparator(); in PriorityBlockingQueue()
255 if (pq.getClass() == PriorityBlockingQueue.class) // exact match in PriorityBlockingQueue()