Home
last modified time | relevance | path

Searched refs:replace (Results 1 – 25 of 86) sorted by relevance

1234

/libcore/ojluni/src/main/java/sun/security/util/
DAlgorithmDecomposer.java136 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/
DMapDefaultMethodTester.java228 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 …]
/libcore/luni/src/main/java/libcore/reflect/
DInternalNames.java51 String name = internalName.substring(1, internalName.length() - 1).replace('/', '.'); in getClass()
84 return 'L' + c.getName().replace('.', '/') + ';'; in getInternalName()
/libcore/luni/src/test/java/libcore/java/lang/
DOldStringTest.java166 assertEquals("Returned incorrect string.", hw1, hw1.replace("!", ".")); in test_replaceCC()
266 assertEquals("Failed replace", "aaccdd", "aabbdd".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence()
268 assertEquals("Failed replace by bigger seq", "cccbccc", "aba".replace( in test_replaceLjava_langCharSequenceLjava_langCharSequence()
271 "$aaaaa^".replace(new StringBuilder("aa"), "b")); in test_replaceLjava_langCharSequenceLjava_langCharSequence()
274 "".replace((CharSequence) null, "123".subSequence(0, 1)); in test_replaceLjava_langCharSequenceLjava_langCharSequence()
281 "".replace("123".subSequence(0, 1), (CharSequence) null); in test_replaceLjava_langCharSequenceLjava_langCharSequence()
DStringTest.java495 assertEquals("-h-e-l-l-o- -w-o-r-l-d-", "hello world".replace("", "-")); in test_55129()
496 assertEquals("-w-o-r-l-d-", "hello world".substring(6).replace("", "-")); in test_55129()
497 assertEquals("-*-w-*-o-*-r-*-l-*-d-*-", "hello world".substring(6).replace("", "-*-")); in test_55129()
501 assertEquals("", "".replace("", "")); in test_55129()
502 assertEquals("food", "".replace("", "food")); in test_55129()
507 assertEquals("", "".replace("foo", "bar")); in test_replace()
509 assertEquals("baz", "baz".replace("foo", "bar")); in test_replace()
511 assertEquals("mmmba", "bababa".replace("baba", "mmm")); in test_replace()
513 assertEquals("foodie", "foolish".replace("lish", "die")); in test_replace()
515 assertEquals("hahahaha", "kkkk".replace("k", "ha")); in test_replace()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMapTest.java451 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()
DConcurrentSkipListSubMapTest.java299 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/
DString2Test.java678 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()
DStringBuffer2Test.java476 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/ojluni/src/test/java/util/concurrent/tck/
DConcurrentHashMapTest.java491 assertNull(map.replace(six, "Z")); in testReplace()
500 assertNotNull(map.replace(one, "Z")); in testReplace2()
510 assertFalse(map.replace(one, "Z", "Z")); in testReplaceValue()
520 assertTrue(map.replace(one, "A", "Z")); in testReplaceValue2()
723 c.replace(null, "whatever"); in testReplace_NullPointerException()
734 c.replace(null, one, "whatever"); in testReplaceValue_NullPointerException()
756 c.replace("whatever", null); in testReplace2_NullPointerException()
767 c.replace("whatever", null, "A"); in testReplaceValue2_NullPointerException()
778 c.replace("whatever", one, null); in testReplaceValue3_NullPointerException()
DConcurrentSkipListSubMapTest.java322 assertNull(map.replace(six, "Z"));
331 assertNotNull(map.replace(one, "Z"));
341 assertFalse(map.replace(one, "Z", "Z"));
351 assertTrue(map.replace(one, "A", "Z"));
590 c.replace(null, "whatever");
601 c.replace(null, one, "whatever");
996 assertNull(map.replace(six, "Z"));
1005 assertNotNull(map.replace(m1, "Z"));
1015 assertFalse(map.replace(m1, "Z", "Z"));
1025 assertTrue(map.replace(m1, "A", "Z"));
[all …]
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/
DSerializationTest.java114 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/
DRegexpPool.java74 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/
DBytecodeDescriptor.java81 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/
DCipherWrapThread.java32 KeyGenerator kg = KeyGenerator.getInstance(getAlgName().replace("Wrap", "")); in crypt()
/libcore/ojluni/src/main/java/java/lang/
DStringBuilder.java262 public StringBuilder replace(int start, int end, String str) { in replace() method in StringBuilder
263 super.replace(start, end, str); in replace()
DPackage.java492 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/tools/upstream/
Dupstream-diff69 rel_path = rel_path.replace('.', '/') + '.java'
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DCharacterDataImpl.java81 buffer.replace(offset, offset + count, arg); in replaceData()
/libcore/ojluni/src/main/java/sun/nio/ch/
DFileLockTable.java73 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/
DURLClassLoader.java364 String path = name.replace('.', '/').concat(".class"); in findClass()
491 String path = name.replace('.', '/').concat("/"); in definePackage()
543 String path = name.replace('.', '/').concat("/"); in isSealed()
681 String path = url.getFile().replace('/', File.separatorChar); in getPermissions()
/libcore/ojluni/src/main/java/java/lang/reflect/
DWeakCache.java149 if (valuesMap.replace(subKey, supplier, factory)) { in get()
243 if (valuesMap.replace(subKey, this, cacheValue)) { in get()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashMap.annotated.java71 public boolean replace(@libcore.util.NullFromTypeParam K key, @libcore.util.Nullable V oldValue, @l… in replace() method in HashMap
73 @libcore.util.Nullable public V replace(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFr… in replace() method in HashMap
/libcore/luni/src/main/java/javax/xml/transform/stream/
DFilePathToURI.java61 path = path.replace(separator, '/'); in filepath2URI()
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/
DHandler.java67 super.parseURL(u, spec.replace(File.separatorChar, '/'), start, limit); in parseURL()

1234