/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the string representation of the specified {@code boolean} value. * The {@code boolean} value is converted to a String according to the rule * defined by {@link String#valueOf(boolean)}. * * @param b * the {@code boolean} value to append. * @return this builder. * @see String#valueOf(boolean) */ public StringBuilder append(boolean b) { append0(b ? "true" : "false"); return this; }
/** * Appends the string representation of the specified {@code char} value. * The {@code char} value is converted to a string according to the rule * defined by {@link String#valueOf(char)}. * * @param c * the {@code char} value to append. * @return this builder. * @see String#valueOf(char) */ public StringBuilder append(char c) { append0(c); return this; }
/** * Appends the string representation of the specified {@code char[]}. * The {@code char[]} is converted to a string according to the rule * defined by {@link String#valueOf(char[])}. * * @param chars * the {@code char[]} to append.. * @return this builder. * @see String#valueOf(char[]) */ public StringBuilder append(char[] chars) { append0(chars); return this; }
/** * Appends the string representation of the specified subset of the {@code * char[]}. The {@code char[]} value is converted to a String according to * the rule defined by {@link String#valueOf(char[],int,int)}. * * @param str * the {@code char[]} to append. * @param offset * the inclusive offset index. * @param len * the number of characters. * @return this builder. * @throws ArrayIndexOutOfBoundsException * if {@code offset} and {@code len} do not specify a valid * subsequence. * @see String#valueOf(char[],int,int) */ public StringBuilder append(char[] str, int offset, int len) { append0(str, offset, len); return this; }
/** * Appends the string representation of the specified subsequence of the * {@code CharSequence}. If the {@code CharSequence} is {@code null}, then * the string {@code "null"} is used to extract the subsequence from. * * @param csq * the {@code CharSequence} to append. * @param start * the beginning index. * @param end * the ending index. * @return this builder. * @throws IndexOutOfBoundsException * if {@code start} or {@code end} are negative, {@code start} * is greater than {@code end} or {@code end} is greater than * the length of {@code csq}. */ public StringBuilder append(CharSequence csq, int start, int end) { append0(csq, start, end); return this; }
/** * Appends the encoded Unicode code point. The code point is converted to a * {@code char[]} as defined by {@link Character#toChars(int)}. * * @param codePoint * the Unicode code point to encode and append. * @return this builder. * @see Character#toChars(int) */ public StringBuilder appendCodePoint(int codePoint) { append0(Character.toChars(codePoint)); return this; }
/** * Appends the string representation of the specified {@code CharSequence}. * If the {@code CharSequence} is {@code null}, then the string {@code * "null"} is appended. * * @param csq * the {@code CharSequence} to append. * @return this builder. */ public StringBuilder append(CharSequence csq) { if (csq == null) { appendNull(); } else { append0(csq, 0, csq.length()); } return this; }
/** * Appends the string representation of the specified {@code Object}. * The {@code Object} value is converted to a string according to the rule * defined by {@link String#valueOf(Object)}. * * @param obj * the {@code Object} to append. * @return this builder. * @see String#valueOf(Object) */ public StringBuilder append(Object obj) { if (obj == null) { appendNull(); } else { append0(obj.toString()); } return this; }
/** * Appends the contents of the specified {@code StringBuffer}. If the * StringBuffer is {@code null}, then the string {@code "null"} is * appended. * * @param sb * the {@code StringBuffer} to append. * @return this builder. */ public StringBuilder append(StringBuffer sb) { if (sb == null) { appendNull(); } else { append0(sb.getValue(), 0, sb.length()); } return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the contents of the specified string. If the string is {@code * null}, then the string {@code "null"} is appended. * * @param str * the string to append. * @return this builder. */ public StringBuilder append(String str) { append0(str); return this; }
/** * Appends the string representation of the specified {@code char[]}. * The {@code char[]} is converted to a string according to the rule * defined by {@link String#valueOf(char[])}. * * @param chars * the {@code char[]} to append.. * @return this builder. * @see String#valueOf(char[]) */ public StringBuilder append(char[] chars) { append0(chars); return this; }
/** * Appends the encoded Unicode code point. The code point is converted to a * {@code char[]} as defined by {@link Character#toChars(int)}. * * @param codePoint * the Unicode code point to encode and append. * @return this builder. * @see Character#toChars(int) */ public StringBuilder appendCodePoint(int codePoint) { append0(Character.toChars(codePoint)); return this; }
/** * Appends the encoded Unicode code point. The code point is converted to a * {@code char[]} as defined by {@link Character#toChars(int)}. * * @param codePoint * the Unicode code point to encode and append. * @return this builder. * @see Character#toChars(int) */ public StringBuilder appendCodePoint(int codePoint) { append0(Character.toChars(codePoint)); return this; }
/** * Appends the encoded Unicode code point. The code point is converted to a * {@code char[]} as defined by {@link Character#toChars(int)}. * * @param codePoint * the Unicode code point to encode and append. * @return this builder. * @see Character#toChars(int) */ public StringBuilder appendCodePoint(int codePoint) { append0(Character.toChars(codePoint)); return this; }