/libcore/ojluni/src/main/java/java/util/ |
D | DualPivotQuicksort.java | 319 for (int unused = --lower, k = ++upper; --k > lower; ) { in sort() 320 int ak = a[k]; in sort() 323 while (lower < k) { in sort() 326 a[k] = a[--upper]; in sort() 329 a[k] = a[lower]; in sort() 336 a[k] = a[--upper]; in sort() 395 for (int k = ++upper; --k > lower; ) { in sort() 396 int ak = a[k]; in sort() 399 a[k] = pivot; in sort() 565 for (int i, k = low; ++k < high; ) { in insertionSort() [all …]
|
D | StringJoiner.java | 178 int k = getChars(prefix, chars, 0); in toString() local 180 k += getChars(elts[0], chars, k); in toString() 182 k += getChars(delimiter, chars, k); in toString() 183 k += getChars(elts[i], chars, k); in toString() 186 k += getChars(suffix, chars, k); in toString() 243 int i = 1, k = getChars(elts[0], chars, 0); in compactElts() local 245 k += getChars(delimiter, chars, k); in compactElts() 246 k += getChars(elts[i], chars, k); in compactElts()
|
D | PriorityQueue.java | 653 private void siftUp(int k, E x) { 655 siftUpUsingComparator(k, x, queue, comparator); 657 siftUpComparable(k, x, queue); 660 private static <T> void siftUpComparable(int k, T x, Object[] es) { 662 while (k > 0) { 663 int parent = (k - 1) >>> 1; 667 es[k] = e; 668 k = parent; 670 es[k] = key; 674 int k, T x, Object[] es, Comparator<? super T> cmp) { in siftUpUsingComparator() argument [all …]
|
D | Timer.java | 687 private void fixUp(int k) { 688 while (k > 1) { 689 int j = k >> 1; 690 if (queue[j].nextExecutionTime <= queue[k].nextExecutionTime) 692 TimerTask tmp = queue[j]; queue[j] = queue[k]; queue[k] = tmp; 693 k = j; 707 private void fixDown(int k) { 709 while ((j = k << 1) <= size && j > 0) { 713 if (queue[k].nextExecutionTime <= queue[j].nextExecutionTime) 715 TimerTask tmp = queue[j]; queue[j] = queue[k]; queue[k] = tmp; [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/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/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelectableChannel.java | 102 private void addKey(SelectionKey k) { in addKey() argument 121 keys[i] = k; in addKey() 136 void removeKey(SelectionKey k) { // package-private in removeKey() argument 139 if (keys[i] == k) { in removeKey() 143 ((AbstractSelectionKey)k).invalidate(); in removeKey() 214 SelectionKey k = findKey(sel); in register() local 215 if (k != null) { in register() 216 k.attach(att); in register() 217 k.interestOps(ops); in register() 220 k = ((AbstractSelector)sel).register(this, ops, att); in register() [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/src/test/java/nio/channels/Selector/ |
D | SelectWithConsumer.java | 80 int n = sel.select(k -> { in testActionInvoked() 82 assertTrue(k == key); in testActionInvoked() 93 n = sel.select(k -> { in testActionInvoked() 95 assertTrue(k == key); in testActionInvoked() 106 n = sel.selectNow(k -> { in testActionInvoked() 108 assertTrue(k == key); in testActionInvoked() 213 int n = sel.select(k -> { in testTwoChannels() 214 assertTrue(k == key1 || k == key2); in testTwoChannels() 222 n = sel.select(k -> { in testTwoChannels() 223 assertTrue(k == key1 || k == key2); in testTwoChannels() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringLatin1.java | 114 for (int k = 0; k < lim; k++) { in compareTo() 115 if (value[k] != other[k]) { in compareTo() 116 return getChar(value, k) - getChar(other, k); in compareTo() 141 for (int k = 0; k < lim; k++) { in compareToUTF16Values() 142 char c1 = getChar(value, k); in compareToUTF16Values() 143 char c2 = StringUTF16.getChar(other, k); in compareToUTF16Values() 155 for (int k = 0; k < lim; k++) { in compareToCI() 156 if (value[k] != other[k]) { in compareToCI() 160 char c1 = (char) Character.toUpperCase(getChar(value, k)); in compareToCI() 161 char c2 = (char) Character.toUpperCase(getChar(other, k)); in compareToCI() [all …]
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | FdlibmTranslit.java | 166 int j, k, ha, hb; in compute() local 185 k = 0; in compute() 200 k += 600; in compute() 213 k -= 1022; in compute() 217 k -= 600; in compute() 239 if (k != 0) { in compute() 242 t1_hi += (k << 20); in compute() 309 int k = 0, xsb; in compute() local 339 k = 1 - xsb - xsb; in compute() 341 k = (int) (INV_LN_2 * x + HAL_F[xsb]); in compute() [all …]
|
/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/security/KeyStore/ |
D | KeyStoreBuilder.java | 54 int k; in testBuilder() local 59 k = ks.size(); in testBuilder() 60 if (k != 0) { in testBuilder() 61 throw new Exception("Size not zero: " + k); in testBuilder() 66 k = ks.size(); in testBuilder() 67 if (k != 0) { in testBuilder() 68 throw new Exception("Size not zero: " + k); in testBuilder() 78 k = ks.size(); in testBuilder() 79 if (k != 0) { in testBuilder() 80 throw new Exception("Size not zero: " + k); in testBuilder()
|
/libcore/ojluni/src/test/java/util/Map/ |
D | Defaults.java | 134 map.forEach((k, v) -> { in testForEach() argument 135 int idx = (null == k) ? 0 : k.ordinal(); // substitute for index. in testForEach() 137 EACH_KEY[idx] = (idx == 0) ? KEYS[0] : k; // substitute for comparison. in testForEach() 138 assertSame(v, map.get(k)); in testForEach() 149 map.replaceAll((k,v) -> { in testReplaceAll() argument 150 int idx = (null == k) ? 0 : k.ordinal(); // substitute for index. in testReplaceAll() 152 EACH_KEY[idx] = (idx == 0) ? KEYS[0] : k; // substitute for comparison. in testReplaceAll() 153 assertSame(v, map.get(k)); in testReplaceAll() 168 …assertThrowsNPE(() -> map.replaceAll((k,v) -> null)); //should not allow replacement with null val… in testReplaceAllNoNullReplacement() 289 assertSame(map.computeIfAbsent(null, (k) -> null), null, "not expected result"); in testComputeIfAbsentNulls() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | TreeSubMapTest.java | 203 Integer k = (Integer)i.next(); in testKeySetOrder() local 204 assertTrue(last.compareTo(k) < 0); in testKeySetOrder() 205 last = k; in testKeySetOrder() 492 Object k; 493 k = (Integer)(i.next()); 494 assertEquals(two, k); 495 k = (Integer)(i.next()); 496 assertEquals(three, k); 523 Object k; 524 k = (Integer)(i.next()); [all …]
|
D | ConcurrentSkipListSubSetTest.java | 539 Object k; in testSubSetContents() local 540 k = (Integer)(i.next()); in testSubSetContents() 541 assertEquals(two, k); in testSubSetContents() 542 k = (Integer)(i.next()); in testSubSetContents() 543 assertEquals(three, k); in testSubSetContents() 570 Object k; in testSubSetContents2() local 571 k = (Integer)(i.next()); in testSubSetContents2() 572 assertEquals(two, k); in testSubSetContents2() 597 Object k; in testHeadSetContents() local 598 k = (Integer)(i.next()); in testHeadSetContents() [all …]
|
D | TreeSubSetTest.java | 536 Object k; in testSubSetContents() local 537 k = (Integer)(i.next()); in testSubSetContents() 538 assertEquals(two, k); in testSubSetContents() 539 k = (Integer)(i.next()); in testSubSetContents() 540 assertEquals(three, k); in testSubSetContents() 567 Object k; in testSubSetContents2() local 568 k = (Integer)(i.next()); in testSubSetContents2() 569 assertEquals(two, k); in testSubSetContents2() 594 Object k; in testHeadSetContents() local 595 k = (Integer)(i.next()); in testHeadSetContents() [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 …]
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | RoundTests.java | 115 for (int k = -5; k <= 5; k++) { in testUnityULPCases() 116 float value = (v1 + k) * sign; in testUnityULPCases() 125 for (int k = -5; k <= 5; k++) { in testUnityULPCases() 126 double value = (v1 + k) * sign; in testUnityULPCases()
|
/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], Boolean.valueOf(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], Boolean.valueOf(i.identityEquals((Identity)value[k]))); in testIdentityEquals() 232 if (Boolean.TRUE.equals(value[k+1])) assertEquals(i.hashCode(), value[k].hashCode()); in testIdentityEquals()
|