/** @throws StringIndexOutOfBoundsException {@inheritDoc} */ @Override public StringBuffer insert(int offset, double d) { // Note, synchronization achieved via invocation of StringBuffer insert(int, String) // after conversion of d to String by super class method // Ditto for toStringCache clearing super.insert(offset, d); return this; }
/** * @throws IndexOutOfBoundsException {@inheritDoc} * @since 1.5 */ @Override public StringBuffer insert(int dstOffset, CharSequence s) { // Note, synchronization achieved via invocations of other StringBuffer methods // after narrowing of s to specific type // Ditto for toStringCache clearing super.insert(dstOffset, s); return this; }
/** * @throws IndexOutOfBoundsException {@inheritDoc} * @see #length() */ public synchronized StringBuffer insert(int offset, char c) { super.insert(offset, c); return this; }
/** * @throws IndexOutOfBoundsException {@inheritDoc} * @since 1.5 */ public synchronized StringBuffer insert(int dstOffset, CharSequence s, int start, int end) { super.insert(dstOffset, s, start, end); return this; }
/** * @throws StringIndexOutOfBoundsException {@inheritDoc} * @see #length() */ public synchronized StringBuffer insert(int offset, String str) { super.insert(offset, str); return this; }
/** * @throws StringIndexOutOfBoundsException {@inheritDoc} * @see java.lang.String#valueOf(java.lang.Object) * @see #insert(int, java.lang.String) * @see #length() */ public synchronized StringBuffer insert(int offset, Object obj) { super.insert(offset, String.valueOf(obj)); return this; }
/** * @throws StringIndexOutOfBoundsException {@inheritDoc} * @since 1.2 */ public synchronized StringBuffer insert(int index, char str[], int offset, int len) { super.insert(index, str, offset, len); return this; }
/** @throws IndexOutOfBoundsException {@inheritDoc} */ @Override public synchronized StringBuffer insert(int offset, char c) { toStringCache = null; super.insert(offset, c); return this; }
/** * @throws IndexOutOfBoundsException {@inheritDoc} * @since 1.5 */ @Override public synchronized StringBuffer insert(int dstOffset, CharSequence s, int start, int end) { toStringCache = null; super.insert(dstOffset, s, start, end); return this; }
/** @throws StringIndexOutOfBoundsException {@inheritDoc} */ @Override public synchronized StringBuffer insert(int offset, Object obj) { toStringCache = null; super.insert(offset, String.valueOf(obj)); return this; }
/** * @throws StringIndexOutOfBoundsException {@inheritDoc} * @since 1.2 */ @Override public synchronized StringBuffer insert(int index, char[] str, int offset, int len) { toStringCache = null; super.insert(index, str, offset, len); return this; }