/libcore/benchmarks/src/benchmarks/regression/ |
D | StringReplaceBenchmark.java | 56 s.value.replace('z', '0'); in timeReplaceCharNonExistent() 62 s.value.replace('a', '0'); in timeReplaceCharRepeated() 68 s.value.replace('q', '0'); in timeReplaceSingleChar() 74 s.value.replace("fish", "0"); in timeReplaceSequenceNonExistent() 80 s.value.replace("jklm", "0"); in timeReplaceSequenceRepeated() 86 s.value.replace("qrst", "0"); in timeReplaceSingleSequence()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentMap.java | 222 boolean replace(K key, V oldValue, V newValue); in replace() method 254 V replace(K key, V value); in replace() method 290 while (!replace(k, v, function.apply(k, v))) { in replaceAll() 376 : replace(key, oldValue, newValue)) in computeIfPresent() 426 if (replace(key, oldValue, newValue)) in compute() 488 if (replace(key, oldValue, newValue)) in merge()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | AlgorithmDecomposer.java | 136 private static void hasLoop(Set<String> elements, String find, String replace) { in hasLoop() argument 138 if (!elements.contains(replace)) { in hasLoop() 139 elements.add(replace); in hasLoop() 170 return algorithm.replace("-", ""); in hashName()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | MapDefaultMethodTester.java | 228 assertFalse(m.replace(1, 1.0, 2.0)); in test_replace$K$V$V() 233 assertFalse(m.replace(1, 2.0, 2.0)); in test_replace$K$V$V() 238 assertTrue(m.replace(1, 1.0, 2.0)); in test_replace$K$V$V() 243 assertTrue(m.replace(null, 1.0, 2.0)); in test_replace$K$V$V() 247 m.replace(null, 1.0, 2.0); in test_replace$K$V$V() 254 assertTrue(m.replace(1, null, 1.0)); in test_replace$K$V$V() 259 m.replace(1, 1.0, null); in test_replace$K$V$V() 268 assertNull(m.replace(1, 1.0)); in test_replace$K$V() 273 assertEquals(1.0, m.replace(1, 2.0)); in test_replace$K$V() 278 assertEquals(1.0, m.replace(1, null)); in test_replace$K$V() [all …]
|
D | CollectionsTest.java | 533 Collections.unmodifiableMap(new HashMap<>()).replace(1, 5.0, 1.0); in test_unmodifiableMap_replace$K$V$V() 542 Collections.unmodifiableMap(m).replace(1, 5.0, 1.0); in test_unmodifiableMap_replace$K$V$V() 550 Collections.unmodifiableMap(new HashMap<>()).replace(1, 5.0); in test_unmodifiableMap_replace$K$V() 559 Collections.unmodifiableMap(m).replace(1, 5.0); in test_unmodifiableMap_replace$K$V() 948 assertThrowsUoe(() -> { map.replace(absentKey, absentValue, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 949 assertThrowsUoe(() -> { map.replace(absentKey, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 960 assertThrowsUoe(() -> { map.replace(sampleKey, sampleValue, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 961 assertThrowsUoe(() -> { map.replace(sampleKey, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 1051 assertThrowsCce(() -> { map.replace(new Object(), presentValue); }); in check_map_isChecked() 1052 assertThrowsCce(() -> { map.replace(presentKey, new Object()); }); in check_map_isChecked() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldStringBufferTest.java | 208 testBuffer.replace(-1, 0, "text"); in test_replaceIILjava_lang_String() 215 testBuffer.replace(0, -1, "text"); in test_replaceIILjava_lang_String() 222 testBuffer.replace(2, 1, "text"); in test_replaceIILjava_lang_String() 229 testBuffer.replace(testBuffer.length() + 1, testBuffer.length() + 1, in test_replaceIILjava_lang_String()
|
D | OldStringTest.java | 166 assertEquals("Returned incorrect string.", hw1, hw1.replace("!", ".")); in test_replaceCC() 262 assertEquals("Failed replace", "aaccdd", "aabbdd".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence() 264 assertEquals("Failed replace by bigger seq", "cccbccc", "aba".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence() 267 "$aaaaa^".replace(new StringBuilder("aa"), "b")); in test_replaceLjava_langCharSequenceLjava_langCharSequence() 270 "".replace((CharSequence) null, "123".subSequence(0, 1)); in test_replaceLjava_langCharSequenceLjava_langCharSequence() 277 "".replace("123".subSequence(0, 1), (CharSequence) null); in test_replaceLjava_langCharSequenceLjava_langCharSequence()
|
D | StringTest.java | 316 assertEquals("-h-e-l-l-o- -w-o-r-l-d-", "hello world".replace("", "-")); in test_55129() 317 assertEquals("-w-o-r-l-d-", "hello world".substring(6).replace("", "-")); in test_55129() 318 assertEquals("-*-w-*-o-*-r-*-l-*-d-*-", "hello world".substring(6).replace("", "-*-")); in test_55129() 322 assertEquals("", "".replace("", "")); in test_55129() 323 assertEquals("food", "".replace("", "food")); in test_55129() 328 assertEquals("", "".replace("foo", "bar")); in test_replace() 330 assertEquals("baz", "baz".replace("foo", "bar")); in test_replace() 332 assertEquals("mmmba", "bababa".replace("baba", "mmm")); in test_replace() 334 assertEquals("foodie", "foolish".replace("lish", "die")); in test_replace() 336 assertEquals("hahahaha", "kkkk".replace("k", "ha")); in test_replace()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | InternalNames.java | 51 String name = internalName.substring(1, internalName.length() - 1).replace('/', '.'); in getClass() 84 return 'L' + c.getName().replace('.', '/') + ';'; in getInternalName()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMapTest.java | 451 assertNull(map.replace(six, "Z")); in testReplace() 460 assertNotNull(map.replace(one, "Z")); in testReplace2() 470 assertFalse(map.replace(one, "Z", "Z")); in testReplaceValue() 480 assertTrue(map.replace(one, "A", "Z")); in testReplaceValue2() 683 c.replace(null, "whatever"); in testReplace_NullPointerException() 694 c.replace(null, one, "whatever"); in testReplaceValue_NullPointerException() 716 c.replace("whatever", null); in testReplace2_NullPointerException() 727 c.replace("whatever", null, "A"); in testReplaceValue2_NullPointerException() 738 c.replace("whatever", one, null); in testReplaceValue3_NullPointerException()
|
D | ConcurrentSkipListSubMapTest.java | 299 assertNull(map.replace(six, "Z")); 308 assertNotNull(map.replace(one, "Z")); 318 assertFalse(map.replace(one, "Z", "Z")); 328 assertTrue(map.replace(one, "A", "Z")); 567 c.replace(null, "whatever"); 578 c.replace(null, one, "whatever"); 973 assertNull(map.replace(six, "Z")); 982 assertNotNull(map.replace(m1, "Z")); 992 assertFalse(map.replace(m1, "Z", "Z")); 1002 assertTrue(map.replace(m1, "A", "Z")); [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | String2Test.java | 678 assertEquals("Failed replace", "HezzoWorzd", hw1.replace('l', 'z')); in test_replaceCC() 685 assertEquals("Failed replace", "aaccdd", "aabbdd".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence() 687 assertEquals("Failed replace by bigger seq", "cccbccc", "aba".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence() 690 .replace(new StringBuilder("aa"), "b")); in test_replaceLjava_langCharSequenceLjava_langCharSequence() 692 "abc".replace("", "%%")); in test_replaceLjava_langCharSequenceLjava_langCharSequence() 694 "aabbcc".replace("b", "")); in test_replaceLjava_langCharSequenceLjava_langCharSequence() 696 "".replace("", "abc")); in test_replaceLjava_langCharSequenceLjava_langCharSequence()
|
D | StringBuffer2Test.java | 476 testBuffer.replace(5, 9, "is a replaced"); in test_replaceIILjava_lang_String() 481 assertEquals("insert1", "text", new StringBuffer().replace(0, 0, "text") in test_replaceIILjava_lang_String() 483 assertEquals("insert2", "123text", new StringBuffer("123").replace(3, 3, "text") in test_replaceIILjava_lang_String() 485 assertEquals("insert2", "1text23", new StringBuffer("123").replace(1, 1, "text") in test_replaceIILjava_lang_String()
|
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/ |
D | SerializationTest.java | 114 String path = name.substring(0, dot).replace('.', File.separatorChar); in getDataFile() 132 + getClass().getName().replace('.', File.separatorChar) in produceGoldenFiles() 426 path.append(test.getClass().getName().replace('.', File.separatorChar)); in getObject() 449 String goldenPath = (test.getClass().getName().replace('.', File.separatorChar) in createGoldenFile()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | RegexpPool.java | 74 public void replace(String re, Object ret) { in replace() method in RegexpPool 165 private void add(String re, Object ret, boolean replace) throws REException { in add() argument 184 if (p.result != null && !replace) in add()
|
/libcore/ojluni/src/main/java/sun/invoke/util/ |
D | BytecodeDescriptor.java | 81 String name = str.substring(begc, endc).replace('/', '.'); in parseSig() 132 sb.append(t.getName().replace('.', '/')); in unparseSig()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | CipherWrapThread.java | 32 KeyGenerator kg = KeyGenerator.getInstance(getAlgName().replace("Wrap", "")); in crypt()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringBuilder.java | 262 public StringBuilder replace(int start, int end, String str) { in replace() method in StringBuilder 263 super.replace(start, end, str); in replace()
|
D | Package.java | 492 String path = name.replace('.', '/').concat("/"); in Package() 556 name = name.replace('.', '/').concat("/"); in getSystemPackage() 604 name = name.substring(0, name.length() - 1).replace('/', '.'); in defineSystemPackage()
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
D | CharacterDataImpl.java | 81 buffer.replace(offset, offset + count, arg); in replaceData()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | FileLockTable.java | 73 public abstract void replace(FileLock fl1, FileLock fl2); in replace() method in FileLockTable 229 public void replace(FileLock fromLock, FileLock toLock) { in replace() method in SharedFileLockTable
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLClassLoader.java | 363 String path = name.replace('.', '/').concat(".class"); in findClass() 486 String path = name.replace('.', '/').concat("/"); in definePackage() 538 String path = name.replace('.', '/').concat("/"); in isSealed() 676 String path = url.getFile().replace('/', File.separatorChar); in getPermissions()
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | WeakCache.java | 149 if (valuesMap.replace(subKey, supplier, factory)) { in get() 243 if (valuesMap.replace(subKey, this, cacheValue)) { in get()
|
/libcore/luni/src/main/java/javax/xml/transform/stream/ |
D | FilePathToURI.java | 61 path = path.replace(separator, '/'); in filepath2URI()
|
/libcore/luni/src/main/java/javax/xml/parsers/ |
D | FilePathToURI.java | 61 path = path.replace(separator, '/'); in filepath2URI()
|