/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }
/** * Adds the specified string to the end of this buffer. * <p> * If the specified string is {@code null} the string {@code "null"} is * appended, otherwise the contents of the specified string is appended. * * @param string * the string to append (may be null). * @return this StringBuffer. */ public synchronized StringBuffer append(String string) { append0(string); return this; }
/** * Adds the specified sequence of characters to the end of this buffer. * * @param chars * the character array to append. * @param start * the starting offset. * @param length * the number of characters. * @return this StringBuffer. * @throws ArrayIndexOutOfBoundsException * if {@code length < 0} , {@code start < 0} or {@code start + * length > chars.length}. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars, int start, int length) { append0(chars, start, length); return this; }
/** * Appends the specified subsequence of the CharSequence to this buffer. * <p> * If the specified CharSequence is {@code null}, then the string {@code * "null"} is used to extract a subsequence. * * @param s * the CharSequence to append. * @param start * the inclusive start index. * @param end * the exclusive end index. * @return this StringBuffer. * @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 s}. * @since 1.5 */ public synchronized StringBuffer append(CharSequence s, int start, int end) { append0(s, start, end); return this; }
/** * Appends the specified CharSequence to this buffer. * <p> * If the specified CharSequence is {@code null} the string {@code "null"} * is appended, otherwise the contents of the specified CharSequence is * appended. * * @param s * the CharSequence to append. * @return this StringBuffer. * @since 1.5 */ public synchronized StringBuffer append(CharSequence s) { if (s == null) { appendNull(); } else { append0(s, 0, s.length()); } return this; }
/** * Adds the string representation of the specified object to the end of this * StringBuffer. * <p> * If the specified object is {@code null} the string {@code "null"} is * appended, otherwise the objects {@code toString} is used to get its * string representation. * * @param obj * the object to append (may be null). * @return this StringBuffer. * @see String#valueOf(Object) */ public synchronized StringBuffer append(Object obj) { if (obj == null) { appendNull(); } else { append0(obj.toString()); } return this; }
/** * Adds the specified StringBuffer to the end of this buffer. * <p> * If the specified StringBuffer is {@code null} the string {@code "null"} * is appended, otherwise the contents of the specified StringBuffer is * appended. * * @param sb * the StringBuffer to append (may be null). * @return this StringBuffer. * * @since 1.4 */ public synchronized StringBuffer append(StringBuffer sb) { if (sb == null) { appendNull(); } else { synchronized (sb) { append0(sb.getValue(), 0, sb.length()); } } return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }
/** * Adds the specified character to the end of this buffer. * * @param ch * the character to append. * @return this StringBuffer. * @see String#valueOf(char) */ public synchronized StringBuffer append(char ch) { append0(ch); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }
/** * Adds the specified string to the end of this buffer. * <p> * If the specified string is {@code null} the string {@code "null"} is * appended, otherwise the contents of the specified string is appended. * * @param string * the string to append (may be null). * @return this StringBuffer. */ public synchronized StringBuffer append(String string) { append0(string); return this; }
/** * Adds the character array to the end of this buffer. * * @param chars * the character array to append. * @return this StringBuffer. * @throws NullPointerException * if {@code chars} is {@code null}. */ public synchronized StringBuffer append(char[] chars) { append0(chars); return this; }