/libcore/ojluni/src/main/java/java/util/ |
D | DualPivotQuicksort.java | 123 for (int k = left; k < right; run[count] = k) { in sort() 124 if (a[k] < a[k + 1]) { // ascending in sort() 125 while (++k <= right && a[k - 1] <= a[k]); in sort() 126 } else if (a[k] > a[k + 1]) { // descending in sort() 127 while (++k <= right && a[k - 1] >= a[k]); in sort() 128 for (int lo = run[count] - 1, hi = k; ++lo < --hi; ) { in sort() 132 for (int m = MAX_RUN_LENGTH; ++k <= right && a[k - 1] == a[k]; ) { in sort() 184 for (int k = (last = 0) + 2; k <= count; k += 2) { in sort() 185 int hi = run[k], mi = run[k - 1]; in sort() 186 for (int i = run[k - 2], p = i, q = mi; i < hi; ++i) { in sort() [all …]
|
D | PriorityQueue.java | 643 private void siftUp(int k, E x) { in siftUp() argument 645 siftUpUsingComparator(k, x); in siftUp() 647 siftUpComparable(k, x); in siftUp() 651 private void siftUpComparable(int k, E x) { in siftUpComparable() argument 653 while (k > 0) { in siftUpComparable() 654 int parent = (k - 1) >>> 1; in siftUpComparable() 658 queue[k] = e; in siftUpComparable() 659 k = parent; in siftUpComparable() 661 queue[k] = key; in siftUpComparable() 665 private void siftUpUsingComparator(int k, E x) { in siftUpUsingComparator() argument [all …]
|
D | Timer.java | 686 private void fixUp(int k) { 687 while (k > 1) { 688 int j = k >> 1; 689 if (queue[j].nextExecutionTime <= queue[k].nextExecutionTime) 691 TimerTask tmp = queue[j]; queue[j] = queue[k]; queue[k] = tmp; 692 k = j; 706 private void fixDown(int k) { 708 while ((j = k << 1) <= size && j > 0) { 712 if (queue[k].nextExecutionTime <= queue[j].nextExecutionTime) 714 TimerTask tmp = queue[j]; queue[j] = queue[k]; queue[k] = tmp; [all …]
|
D | IdentityHashMap.java | 325 Object k = maskNull(key); in get() local 328 int i = hash(k, len); in get() 331 if (item == k) in get() 349 Object k = maskNull(key); in containsKey() local 352 int i = hash(k, len); in containsKey() 355 if (item == k) in containsKey() 390 Object k = maskNull(key); in containsMapping() local 393 int i = hash(k, len); in containsMapping() 396 if (item == k) in containsMapping() 420 final Object k = maskNull(key); in put() local [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | MapOfTest.java | 256 private<K,V> K k(int index, Map.Entry<K, V>... entries) { in k() method 267 case 1: return Map.of(k(0, e), v(0, e)); in create() 268 case 2: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e)); in create() 269 case 3: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e)); in create() 270 … case 4: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e)); in create() 271 …case 5: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e), k(4,… in create() 272 …case 6: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e), k(4,… in create() 273 …case 7: return Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e), k(4,… in create() 274 …eturn Map.of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e), k(4, e), v(4,… in create() 275 ….of(k(0, e), v(0, e), k(1, e), v(1, e), k(2, e), v(2, e), k(3, e), v(3, e), k(4, e), v(4, e), k(5,… in create() [all …]
|
D | MapDefaultMethodTester.java | 303 assertEquals(5.0, m.computeIfAbsent(1, (k) -> 5.0 * k)); in test_computeIfAbsent() 308 assertEquals(1.0, m.computeIfAbsent(1, k -> 6.0 * k)); in test_computeIfAbsent() 313 assertEquals(1.0, m.computeIfAbsent(1, k -> null)); in test_computeIfAbsent() 317 assertNull(m.computeIfAbsent(100, k-> null)); in test_computeIfAbsent() 328 assertEquals(1.0, m.computeIfAbsent(1, k -> 1.0)); in test_computeIfAbsent() 334 assertEquals(1.0, m.computeIfAbsent(null, (k) -> 5.0 * k)); in test_computeIfAbsent() 337 m.computeIfAbsent(null, k -> 5.0); in test_computeIfAbsent() 345 assertNull(m.computeIfPresent(1, (k, v) -> 5.0 * k + v)); in test_computeIfPresent() 349 assertEquals(11.0, m.computeIfPresent(1, (k, v) -> 6.0 * k + v)); in test_computeIfPresent() 353 assertNull(m.computeIfPresent(1, (k, v) -> null)); in test_computeIfPresent() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/ |
D | OldSHA1PRNGSecureRandomTest.java | 132 for (int k = 1; k < LENGTH; k += INCR) { in testNextBytesbyteArray02() 133 myBytes1 = new byte[k]; in testNextBytesbyteArray02() 134 myBytes2 = new byte[k]; in testNextBytesbyteArray02() 138 for (int l = 0; l < k; l++) { in testNextBytesbyteArray02() 139 assertFalse("unexpected: myBytes1[l] != myBytes2[l] :: l==" + l + " k=" + k in testNextBytesbyteArray02() 154 for (int k = 0; k < bytes1.length; k++) { in testNextBytesbyteArray02() 155 sr.nextBytes(bytes1[k]); in testNextBytesbyteArray02() 157 for (int k = 0; k < bytes2.length; k++) { in testNextBytesbyteArray02() 158 sr2.nextBytes(bytes2[k]); in testNextBytesbyteArray02() 161 for (int k = 0; k < n3; k++) { in testNextBytesbyteArray02() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | DigestOutputStreamTest.java | 145 for (int k=0; k<algorithmName.length; k++) { in testWriteint01() 147 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint01() 157 MDGoldenData.getDigest(algorithmName[k]))); in testWriteint01() 177 for (int k=0; k<algorithmName.length; k++) { in testWriteint02() 179 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint02() 194 MDGoldenData.getDigest(algorithmName[k]+"_NU"))); in testWriteint02() 211 for (int k=0; k<algorithmName.length; k++) { in testWriteint03() 213 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint03() 284 for (int k=0; k<algorithmName.length; k++) { in test_write$BII_1() 287 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in test_write$BII_1() [all …]
|
/libcore/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelectableChannel.java | 95 private void addKey(SelectionKey k) { in addKey() argument 114 keys[i] = k; in addKey() 129 void removeKey(SelectionKey k) { // package-private in removeKey() argument 132 if (keys[i] == k) { in removeKey() 136 ((AbstractSelectionKey)k).invalidate(); in removeKey() 202 SelectionKey k = findKey(sel); in register() local 203 if (k != null) { in register() 204 k.interestOps(ops); in register() 205 k.attach(att); in register() 207 if (k == null) { in register() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | MessageHeader.java | 84 public synchronized String findValue(String k) { in findValue() argument 85 if (k == null) { in findValue() 91 if (k.equalsIgnoreCase(keys[i])) in findValue() 98 public synchronized int getKey(String k) { in getKey() argument 100 if ((keys[i] == k) || in getKey() 101 (k != null && k.equalsIgnoreCase(keys[i]))) in getKey() 127 public synchronized String findNextValue(String k, String v) { in findNextValue() argument 129 if (k == null) { in findNextValue() 138 if (k.equalsIgnoreCase(keys[i])) in findNextValue() 151 public boolean filterNTLMResponses(String k) { in filterNTLMResponses() argument [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | KeyGeneratorThread.java | 32 Key k = kg.generateKey(); in test() local 33 if(kg.getAlgorithm().toLowerCase().equals(k.getAlgorithm().toLowerCase()) != true) { in test() 41 byte[] array1 = k.getEncoded(); in test() 42 k = kg.generateKey(); in test() 43 byte[] array2 = k.getEncoded(); in test() 56 k = kg.generateKey(); in test() 57 array1 = k.getEncoded(); in test() 60 k = kg.generateKey(); in test() 61 array2 = k.getEncoded(); in test()
|
/libcore/ojluni/annotations/hiddenapi/sun/net/www/ |
D | MessageHeader.java | 57 public synchronized java.lang.String findValue(java.lang.String k) { in findValue() argument 61 public synchronized int getKey(java.lang.String k) { in getKey() argument 73 public synchronized java.lang.String findNextValue(java.lang.String k, java.lang.String v) { in findNextValue() argument 77 public boolean filterNTLMResponses(java.lang.String k) { in filterNTLMResponses() argument 81 public java.util.Iterator<java.lang.String> multiValueIterator(java.lang.String k) { in multiValueIterator() argument 108 public synchronized void add(java.lang.String k, java.lang.String v) { in add() argument 113 public synchronized void prepend(java.lang.String k, java.lang.String v) { in prepend() argument 117 public synchronized void set(int i, java.lang.String k, java.lang.String v) { in set() argument 125 public synchronized void remove(java.lang.String k) { in remove() argument 130 public synchronized void set(java.lang.String k, java.lang.String v) { in set() argument [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKZoneOffset.java | 254 for (int k = -59; k <= 59; k++) { in test_factory_string_hours_minutes_seconds_noColon() 255 if ((i < 0 && j <= 0 && k <= 0) || (i > 0 && j >= 0 && k >= 0) || in test_factory_string_hours_minutes_seconds_noColon() 256 (i == 0 && ((j < 0 && k <= 0) || (j > 0 && k >= 0) || j == 0))) { in test_factory_string_hours_minutes_seconds_noColon() 257 String str = (i < 0 || j < 0 || k < 0 ? "-" : "+") + in test_factory_string_hours_minutes_seconds_noColon() 260 Integer.toString(Math.abs(k) + 100).substring(1); in test_factory_string_hours_minutes_seconds_noColon() 262 doTestOffset(test, i, j, k); in test_factory_string_hours_minutes_seconds_noColon() 277 for (int k = -59; k <= 59; k++) { in test_factory_string_hours_minutes_seconds_colon() 278 if ((i < 0 && j <= 0 && k <= 0) || (i > 0 && j >= 0 && k >= 0) || in test_factory_string_hours_minutes_seconds_colon() 279 (i == 0 && ((j < 0 && k <= 0) || (j > 0 && k >= 0) || j == 0))) { in test_factory_string_hours_minutes_seconds_colon() 280 String str = (i < 0 || j < 0 || k < 0 ? "-" : "+") + in test_factory_string_hours_minutes_seconds_colon() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | TreeSubMapTest.java | 180 Integer k = (Integer)i.next(); in testKeySetOrder() local 181 assertTrue(last.compareTo(k) < 0); in testKeySetOrder() 182 last = k; in testKeySetOrder() 469 Object k; 470 k = (Integer)(i.next()); 471 assertEquals(two, k); 472 k = (Integer)(i.next()); 473 assertEquals(three, k); 500 Object k; 501 k = (Integer)(i.next()); [all …]
|
D | TreeSubSetTest.java | 513 Object k; in testSubSetContents() local 514 k = (Integer)(i.next()); in testSubSetContents() 515 assertEquals(two, k); in testSubSetContents() 516 k = (Integer)(i.next()); in testSubSetContents() 517 assertEquals(three, k); in testSubSetContents() 544 Object k; in testSubSetContents2() local 545 k = (Integer)(i.next()); in testSubSetContents2() 546 assertEquals(two, k); in testSubSetContents2() 571 Object k; in testHeadSetContents() local 572 k = (Integer)(i.next()); in testHeadSetContents() [all …]
|
D | ConcurrentSkipListSubSetTest.java | 516 Object k; in testSubSetContents() local 517 k = (Integer)(i.next()); in testSubSetContents() 518 assertEquals(two, k); in testSubSetContents() 519 k = (Integer)(i.next()); in testSubSetContents() 520 assertEquals(three, k); in testSubSetContents() 547 Object k; in testSubSetContents2() local 548 k = (Integer)(i.next()); in testSubSetContents2() 549 assertEquals(two, k); in testSubSetContents2() 574 Object k; in testHeadSetContents() local 575 k = (Integer)(i.next()); in testHeadSetContents() [all …]
|
D | TreeMapTest.java | 188 Integer k = (Integer)i.next(); in testKeySetOrder() local 189 assertTrue(last.compareTo(k) < 0); in testKeySetOrder() 190 last = k; in testKeySetOrder() 207 Integer k = (Integer)i.next(); 208 assertTrue(last.compareTo(k) > 0); 209 last = k; 226 Integer k = (Integer)i.next(); in testDescendingKeySetOrder() local 227 assertTrue(last.compareTo(k) > 0); in testDescendingKeySetOrder() 228 last = k; in testDescendingKeySetOrder() 245 Integer k = (Integer)i.next(); in testDescendingKeySetDescendingIteratorOrder() local [all …]
|
D | ConcurrentSkipListSubMapTest.java | 181 Integer k = (Integer)i.next(); in testKeySetOrder() local 182 assertTrue(last.compareTo(k) < 0); in testKeySetOrder() 183 last = k; in testKeySetOrder() 634 Object k; 635 k = (Integer)(i.next()); 636 assertEquals(two, k); 637 k = (Integer)(i.next()); 638 assertEquals(three, k); 665 Object k; 666 k = (Integer)(i.next()); [all …]
|
D | ConcurrentSkipListMapTest.java | 189 Integer k = (Integer)i.next(); in testKeySetOrder() local 190 assertTrue(last.compareTo(k) < 0); in testKeySetOrder() 191 last = k; in testKeySetOrder() 208 Integer k = (Integer)i.next(); 209 assertTrue(last.compareTo(k) > 0); 210 last = k; 227 Integer k = (Integer)i.next(); in testDescendingKeySetOrder() local 228 assertTrue(last.compareTo(k) > 0); in testDescendingKeySetOrder() 229 last = k; in testDescendingKeySetOrder() 246 Integer k = (Integer)i.next(); in testDescendingKeySetDescendingIteratorOrder() local [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | ByteArrayInputStream.java | 212 long k = count - pos; in skip() local 213 if (n < k) { in skip() 214 k = n < 0 ? 0 : n; in skip() 217 pos += k; in skip() 218 return k; in skip()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | ThreadLocal.java | 312 Entry(ThreadLocal<?> k, Object v) { in Entry() argument 313 super(k); in Entry() 436 ThreadLocal<?> k = e.get(); in getEntryAfterMiss() local 437 if (k == key) in getEntryAfterMiss() 439 if (k == null) in getEntryAfterMiss() 468 ThreadLocal<?> k = e.get(); in set() local 470 if (k == key) { in set() 475 if (k == null) { in set() 542 ThreadLocal<?> k = e.get(); in replaceStaleEntry() local 549 if (k == key) { in replaceStaleEntry() [all …]
|
/libcore/luni/src/test/java/tests/java/security/ |
D | IdentityTest.java | 67 for (int k=0; k<value.length; k+=2) { in testEquals() 68 assertEquals(value[k+1], new Boolean(i1.equals(value[k]))); in testEquals() 69 if (Boolean.TRUE.equals(value[k+1])) assertEquals(i1.hashCode(), value[k].hashCode()); in testEquals() 230 for (int k=0; k<value.length; k+=2){ in testIdentityEquals() 231 assertEquals(value[k+1], new Boolean(i.identityEquals((Identity)value[k]))); in testIdentityEquals() 232 if (Boolean.TRUE.equals(value[k+1])) assertEquals(i.hashCode(), value[k].hashCode()); in testIdentityEquals()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | PriorityBlockingQueue.java | 355 private static <T> void siftUpComparable(int k, T x, Object[] array) { in siftUpComparable() argument 357 while (k > 0) { in siftUpComparable() 358 int parent = (k - 1) >>> 1; in siftUpComparable() 362 array[k] = e; in siftUpComparable() 363 k = parent; in siftUpComparable() 365 array[k] = key; in siftUpComparable() 368 private static <T> void siftUpUsingComparator(int k, T x, Object[] array, in siftUpUsingComparator() argument 370 while (k > 0) { in siftUpUsingComparator() 371 int parent = (k - 1) >>> 1; in siftUpUsingComparator() 375 array[k] = e; in siftUpUsingComparator() [all …]
|
D | ConcurrentMap.java | 115 K k; in forEach() local 118 k = entry.getKey(); in forEach() 124 action.accept(k, v); in forEach() 289 forEach((k,v) -> { in replaceAll() argument 290 while (!replace(k, v, function.apply(k, v))) { in replaceAll() 292 if ( (v = get(k)) == null) { in replaceAll()
|
/libcore/luni/src/main/native/ |
D | java_lang_StringToReal.cpp | 271 int32_t k, comparison, comparison2; in doubleAlgorithm() local 284 k = doubleExponent (z); in doubleAlgorithm() 294 if (e >= 0 && k >= 0) in doubleAlgorithm() 302 yLength = (k >> 6) + 2; in doubleAlgorithm() 306 simpleShiftLeftHighPrecision (y, yLength, k); in doubleAlgorithm() 310 xLength = sizeOfTenToTheE (e) + length + ((-k) >> 6) + 1; in doubleAlgorithm() 315 simpleShiftLeftHighPrecision (x, xLength, -k); in doubleAlgorithm() 321 else if (k >= 0) in doubleAlgorithm() 326 yLength = sizeOfTenToTheE (-e) + 2 + (k >> 6); in doubleAlgorithm() 331 simpleShiftLeftHighPrecision (y, yLength, k); in doubleAlgorithm() [all …]
|