/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StringBuilderTest.java | 34 StringBuilder sb = new StringBuilder(); in test_Constructor() local 35 assertNotNull(sb); in test_Constructor() 36 assertEquals(16, sb.capacity()); in test_Constructor() 43 StringBuilder sb = new StringBuilder(24); in test_ConstructorI() local 44 assertNotNull(sb); in test_ConstructorI() 45 assertEquals(24, sb.capacity()); in test_ConstructorI() 62 StringBuilder sb = new StringBuilder((CharSequence) "fixture"); in test_ConstructorLjava_lang_CharSequence() local 63 assertEquals("fixture", sb.toString()); in test_ConstructorLjava_lang_CharSequence() 64 assertEquals("fixture".length() + 16, sb.capacity()); in test_ConstructorLjava_lang_CharSequence() 66 sb = new StringBuilder((CharSequence) new StringBuffer("fixture")); in test_ConstructorLjava_lang_CharSequence() [all …]
|
D | StringBufferTest.java | 139 StringBuffer sb = new StringBuffer(); in test_appendLjava_lang_CharSequence() local 140 assertSame(sb, sb.append((CharSequence) "ab")); in test_appendLjava_lang_CharSequence() 141 assertEquals("ab", sb.toString()); in test_appendLjava_lang_CharSequence() 142 sb.setLength(0); in test_appendLjava_lang_CharSequence() 143 assertSame(sb, sb.append((CharSequence) "cd")); in test_appendLjava_lang_CharSequence() 144 assertEquals("cd", sb.toString()); in test_appendLjava_lang_CharSequence() 145 sb.setLength(0); in test_appendLjava_lang_CharSequence() 146 assertSame(sb, sb.append((CharSequence) null)); in test_appendLjava_lang_CharSequence() 147 assertEquals("null", sb.toString()); in test_appendLjava_lang_CharSequence() 155 StringBuffer sb = new StringBuffer(); in test_appendLjava_lang_CharSequenceII() local [all …]
|
D | StringBuffer2Test.java | 38 StringBuffer sb = new StringBuffer(8); in test_ConstructorI() local 39 assertEquals("Newly constructed buffer is of incorrect length", 0, sb in test_ConstructorI() 49 StringBuffer sb = new StringBuffer("HelloWorld"); in test_ConstructorLjava_lang_String() local 51 assertTrue("Invalid buffer created", sb.length() == 10 in test_ConstructorLjava_lang_String() 52 && (sb.toString().equals("HelloWorld"))); in test_ConstructorLjava_lang_String() 82 StringBuffer sb = new StringBuffer(); in test_append$CII() local 85 sb.append(buf1, 0, buf1.length); in test_append$CII() 86 assertEquals("Buffer is invalid length after append", 5, sb.length()); in test_append$CII() 87 sb.append(buf2, 0, buf2.length); in test_append$CII() 88 assertEquals("Buffer is invalid length after append", 10, sb.length()); in test_append$CII() [all …]
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | XMLFormatter.java | 50 private void a2(StringBuilder sb, int x) { in a2() argument 52 sb.append('0'); in a2() 54 sb.append(x); in a2() 58 private void appendISO8601(StringBuilder sb, long millis) { in appendISO8601() argument 61 sb.append(cal.get(Calendar.YEAR)); in appendISO8601() 62 sb.append('-'); in appendISO8601() 63 a2(sb, cal.get(Calendar.MONTH) + 1); in appendISO8601() 64 sb.append('-'); in appendISO8601() 65 a2(sb, cal.get(Calendar.DAY_OF_MONTH)); in appendISO8601() 66 sb.append('T'); in appendISO8601() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringBuilderTest.java | 24 StringBuilder sb = new StringBuilder("oarFish_"); in test_deleteChatAt_lastRange() local 25 sb.append('a'); in test_deleteChatAt_lastRange() 26 String oarFishA = sb.toString(); in test_deleteChatAt_lastRange() 28 sb.deleteCharAt(sb.length() - 1); in test_deleteChatAt_lastRange() 29 sb.append('b'); in test_deleteChatAt_lastRange() 30 String oarFishB = sb.toString(); in test_deleteChatAt_lastRange() 38 StringBuilder sb = new StringBuilder(); in test_deleteCharAt_lastChar() local 39 sb.append('a'); in test_deleteCharAt_lastChar() 40 String a = sb.toString(); in test_deleteCharAt_lastChar() 42 sb.deleteCharAt(0); in test_deleteCharAt_lastChar() [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | SpinedBufferTest.java | 67 SpinedBuffer<Integer> sb = new SpinedBuffer<>(); in createSpinedBuffer() local 68 Arrays.stream(array).boxed().forEach(sb); in createSpinedBuffer() 69 params.add(new Object[]{array, sb}); in createSpinedBuffer() 71 sb = new SpinedBuffer<>(size / 2); in createSpinedBuffer() 72 Arrays.stream(array).boxed().forEach(sb); in createSpinedBuffer() 73 params.add(new Object[]{array, sb}); in createSpinedBuffer() 75 sb = new SpinedBuffer<>(size); in createSpinedBuffer() 76 Arrays.stream(array).boxed().forEach(sb); in createSpinedBuffer() 77 params.add(new Object[]{array, sb}); in createSpinedBuffer() 79 sb = new SpinedBuffer<>(size * 2); in createSpinedBuffer() [all …]
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | Vertex.java | 135 StringBuilder sb = new StringBuilder(); in certToString() local 145 return sb.toString(); in certToString() 148 sb.append("Issuer: ").append in certToString() 150 sb.append("Subject: ").append in certToString() 152 sb.append("SerialNum: ").append in certToString() 154 sb.append("Expires: ").append in certToString() 158 sb.append("IssuerUID: "); in certToString() 160 sb.append(b ? 1 : 0); in certToString() 162 sb.append("\n"); in certToString() 166 sb.append("SubjectUID: "); in certToString() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StringBuilderBenchmark.java | 30 StringBuilder sb = new StringBuilder(); in timeAppendBoolean() local 32 sb.append(true); in timeAppendBoolean() 39 StringBuilder sb = new StringBuilder(); in timeAppendChar() local 41 sb.append('c'); in timeAppendChar() 49 StringBuilder sb = new StringBuilder(); in timeAppendCharArray() local 51 sb.append(chars); in timeAppendCharArray() 59 StringBuilder sb = new StringBuilder(); in timeAppendCharSequence() local 61 sb.append(cs); in timeAppendCharSequence() 69 StringBuilder sb = new StringBuilder(); in timeAppendSubCharSequence() local 71 sb.append(cs); in timeAppendSubCharSequence() [all …]
|
D | FormatterBenchmark.java | 35 StringBuilder sb = new StringBuilder(); in timeStringBuilder_NoFormatting() local 36 … sb.append("this is a reasonably short string that doesn't actually need any formatting"); in timeStringBuilder_NoFormatting() 59 StringBuilder sb = new StringBuilder(); in timeStringBuilder_OneInt() local 60 sb.append("this is a reasonably short string that has an int "); in timeStringBuilder_OneInt() 61 sb.append(1024); in timeStringBuilder_OneInt() 62 sb.append(" in it"); in timeStringBuilder_OneInt() 76 StringBuilder sb = new StringBuilder(); in timeStringBuilder_OneHexInt() local 77 sb.append("this is a reasonably short string that has an int "); in timeStringBuilder_OneHexInt() 78 sb.append(Integer.toHexString(1024)); in timeStringBuilder_OneHexInt() 79 sb.append(" in it"); in timeStringBuilder_OneHexInt() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamBuilderTest.java | 93 Stream.Builder<Integer> sb = Stream.builder(); in testAfterBuilding() local 94 IntStream.range(0, size).boxed().forEach(sb); in testAfterBuilding() 95 sb.build(); in testAfterBuilding() 97 checkISE(() -> sb.accept(1)); in testAfterBuilding() 98 checkISE(() -> sb.add(1)); in testAfterBuilding() 99 checkISE(() -> sb.build()); in testAfterBuilding() 105 Stream.Builder<Integer> sb = Stream.builder(); in testStreamBuilder() 106 IntStream.range(0, s).boxed().forEach(sb); in testStreamBuilder() 107 return sb.build(); in testStreamBuilder() 111 Stream.Builder<Integer> sb = Stream.builder(); in testStreamBuilder() [all …]
|
/libcore/luni/src/main/java/libcore/util/ |
D | Objects.java | 44 StringBuilder sb = new StringBuilder(); in toString() local 45 sb.append(c.getSimpleName()).append('['); in toString() 56 sb.append(','); in toString() 59 sb.append(f.getName()); in toString() 60 sb.append('='); in toString() 64 sb.append(Arrays.toString((boolean[]) value)); in toString() 66 sb.append(Arrays.toString((byte[]) value)); in toString() 68 sb.append(Arrays.toString((char[]) value)); in toString() 70 sb.append(Arrays.toString((double[]) value)); in toString() 72 sb.append(Arrays.toString((float[]) value)); in toString() [all …]
|
/libcore/support/src/test/java/tests/util/ |
D | SummaryStatistics.java | 73 StringBuilder sb = new StringBuilder("SummaryStatistics{"); in toString() local 74 sb.append("n="); in toString() 75 sb.append(numValues); in toString() 76 sb.append(",mean="); in toString() 77 sb.append(mean()); in toString() 78 sb.append(",var="); in toString() 79 sb.append(var()); in toString() 80 sb.append(",stddev="); in toString() 81 sb.append(stddev()); in toString() 82 sb.append(",coeffVar="); in toString() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | OldAndroidNIOTest.java | 53 ShortBuffer sb = ShortBuffer.wrap(shortArray); in testNIO_short_array() local 54 shortBufferTest(sb); in testNIO_short_array() 349 ShortBuffer sb = bb.asShortBuffer(); in byteBufferTest() local 351 checkBuffer(sb); in byteBufferTest() 352 assertEquals(2, sb.capacity()); in byteBufferTest() 353 assertEquals((short) 0xA2A1, sb.get()); in byteBufferTest() 354 assertEquals((short) 0xA4A3, sb.get()); in byteBufferTest() 357 sb = bb.asShortBuffer(); in byteBufferTest() 359 checkBuffer(sb); in byteBufferTest() 360 assertEquals(2, sb.capacity()); in byteBufferTest() [all …]
|
/libcore/ojluni/src/main/java/java/util/regex/ |
D | PatternSyntaxException.java | 108 StringBuffer sb = new StringBuffer(); in getMessage() local 109 sb.append(desc); in getMessage() 111 sb.append(" near index "); in getMessage() 112 sb.append(index); in getMessage() 114 sb.append(nl); in getMessage() 115 sb.append(pattern); in getMessage() 117 sb.append(nl); in getMessage() 118 for (int i = 0; i < index; i++) sb.append(' '); in getMessage() 119 sb.append('^'); in getMessage() 121 return sb.toString(); in getMessage()
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | ParseUtil.java | 178 StringBuilder sb = new StringBuilder(n); in decode() 189 sb.append(c); in decode() 220 sb.append(cb.flip().toString()); in decode() 223 return sb.toString(); in decode() 333 StringBuffer sb = new StringBuffer(); in toString() local 335 sb.append(scheme); in toString() 336 sb.append(':'); in toString() 338 appendSchemeSpecificPart(sb, opaquePart, in toString() 341 appendFragment(sb, fragment); in toString() 342 return sb.toString(); in toString() [all …]
|
/libcore/ojluni/src/main/java/java/security/cert/ |
D | PKIXCertPathBuilderResult.java | 110 StringBuffer sb = new StringBuffer(); in toString() local 111 sb.append("PKIXCertPathBuilderResult: [\n"); in toString() 112 sb.append(" Certification Path: " + certPath + "\n"); in toString() 113 sb.append(" Trust Anchor: " + getTrustAnchor().toString() + "\n"); in toString() 114 sb.append(" Policy Tree: " + String.valueOf(getPolicyTree()) + "\n"); in toString() 115 sb.append(" Subject Public Key: " + getPublicKey() + "\n"); in toString() 116 sb.append("]"); in toString() 117 return sb.toString(); in toString()
|
/libcore/ojluni/src/main/java/java/beans/ |
D | PropertyChangeEvent.java | 154 StringBuilder sb = new StringBuilder(getClass().getName()); in toString() local 155 sb.append("[propertyName=").append(getPropertyName()); in toString() 156 appendTo(sb); in toString() 157 sb.append("; oldValue=").append(getOldValue()); in toString() 158 sb.append("; newValue=").append(getNewValue()); in toString() 159 sb.append("; propagationId=").append(getPropagationId()); in toString() 160 sb.append("; source=").append(getSource()); in toString() 161 return sb.append("]").toString(); in toString() 164 void appendTo(StringBuilder sb) { in appendTo() argument
|
/libcore/ojluni/src/main/java/java/util/ |
D | Formatter.java | 3013 StringBuilder sb = new StringBuilder(); in justify() 3017 for (int i = 0; i < sp; i++) sb.append(' '); in justify() 3018 sb.append(s); in justify() 3020 for (int i = 0; i < sp; i++) sb.append(' '); in justify() 3021 return sb.toString(); in justify() 3025 StringBuilder sb = new StringBuilder("%"); in toString() local 3028 sb.append(dupf.toString()); in toString() 3030 sb.append(index).append('$'); in toString() 3032 sb.append(width); in toString() 3034 sb.append('.').append(precision); in toString() [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | Executable.java | 68 void separateWithCommas(Class<?>[] types, StringBuilder sb) { in separateWithCommas() argument 70 sb.append(types[j].getTypeName()); in separateWithCommas() 72 sb.append(","); in separateWithCommas() 77 void printModifiersIfNonzero(StringBuilder sb, int mask, boolean isDefault) { in printModifiersIfNonzero() argument 81 sb.append(Modifier.toString(mod)).append(' '); in printModifiersIfNonzero() 85 sb.append(Modifier.toString(access_mod)).append(' '); in printModifiersIfNonzero() 87 sb.append("default "); in printModifiersIfNonzero() 90 sb.append(Modifier.toString(mod)).append(' '); in printModifiersIfNonzero() 99 StringBuilder sb = new StringBuilder(); in sharedToString() local 101 printModifiersIfNonzero(sb, modifierMask, isDefault); in sharedToString() [all …]
|
D | Modifier.java | 229 StringBuilder sb = new StringBuilder(); in toString() local 232 if ((mod & PUBLIC) != 0) sb.append("public "); in toString() 233 if ((mod & PROTECTED) != 0) sb.append("protected "); in toString() 234 if ((mod & PRIVATE) != 0) sb.append("private "); in toString() 237 if ((mod & ABSTRACT) != 0) sb.append("abstract "); in toString() 238 if ((mod & STATIC) != 0) sb.append("static "); in toString() 239 if ((mod & FINAL) != 0) sb.append("final "); in toString() 240 if ((mod & TRANSIENT) != 0) sb.append("transient "); in toString() 241 if ((mod & VOLATILE) != 0) sb.append("volatile "); in toString() 242 if ((mod & SYNCHRONIZED) != 0) sb.append("synchronized "); in toString() [all …]
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | PosixFilePermissions.java | 42 private static void writeBits(StringBuilder sb, boolean r, boolean w, boolean x) { in writeBits() argument 44 sb.append('r'); in writeBits() 46 sb.append('-'); in writeBits() 49 sb.append('w'); in writeBits() 51 sb.append('-'); in writeBits() 54 sb.append('x'); in writeBits() 56 sb.append('-'); in writeBits() 74 StringBuilder sb = new StringBuilder(9); in toString() local 75 writeBits(sb, perms.contains(OWNER_READ), perms.contains(OWNER_WRITE), in toString() 77 writeBits(sb, perms.contains(GROUP_READ), perms.contains(GROUP_WRITE), in toString() [all …]
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | InvalidPathException.java | 120 StringBuffer sb = new StringBuffer(); in getMessage() local 121 sb.append(getReason()); in getMessage() 123 sb.append(" at index "); in getMessage() 124 sb.append(index); in getMessage() 126 sb.append(": "); in getMessage() 127 sb.append(input); in getMessage() 128 return sb.toString(); in getMessage()
|
/libcore/ojluni/src/main/java/java/net/ |
D | URISyntaxException.java | 124 StringBuffer sb = new StringBuffer(); in getMessage() local 125 sb.append(getReason()); in getMessage() 127 sb.append(" at index "); in getMessage() 128 sb.append(index); in getMessage() 130 sb.append(": "); in getMessage() 131 sb.append(input); in getMessage() 132 return sb.toString(); in getMessage()
|
/libcore/ojluni/src/main/java/sun/invoke/util/ |
D | BytecodeDescriptor.java | 98 StringBuilder sb = new StringBuilder(); in unparse() local 99 unparseSig(type, sb); in unparse() 100 return sb.toString(); in unparse() 116 StringBuilder sb = new StringBuilder(); in unparseMethod() local 117 sb.append('('); in unparseMethod() 119 unparseSig(pt, sb); in unparseMethod() 120 sb.append(')'); in unparseMethod() 121 unparseSig(rtype, sb); in unparseMethod() 122 return sb.toString(); in unparseMethod() 125 static private void unparseSig(Class<?> t, StringBuilder sb) { in unparseSig() argument [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | Era.java | 146 StringBuilder sb = new StringBuilder(); in toString() local 147 sb.append('['); in toString() 148 sb.append(getName()).append(" ("); in toString() 149 sb.append(getAbbreviation()).append(')'); in toString() 150 sb.append(" since ").append(getSinceDate()); in toString() 152 sb.setLength(sb.length() - 1); // remove 'Z' in toString() 153 sb.append(" local time"); in toString() 155 sb.append(']'); in toString() 156 return sb.toString(); in toString()
|