private CharTermAttribute appendNull() { resizeBuffer(termLength + 4); termBuffer[termLength++] = 'n'; termBuffer[termLength++] = 'u'; termBuffer[termLength++] = 'l'; termBuffer[termLength++] = 'l'; return this; }
@Override public final CharTermAttribute append(char c) { resizeBuffer(termLength + 1)[termLength++] = c; return this; }
@Override public final CharTermAttribute append(StringBuilder s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(String s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(CharTermAttribute ta) { if (ta == null) // needed for Appendable compliance return appendNull(); final int len = ta.length(); System.arraycopy(ta.buffer(), 0, resizeBuffer(termLength + len), termLength, len); termLength += len; return this; }
if (len == 0) return this; resizeBuffer(termLength + len); if (len > 4) { // only use instanceof check series for longer CSQs, else simply iterate if (csq instanceof String) {
private CharTermAttribute appendNull() { resizeBuffer(termLength + 4); termBuffer[termLength++] = 'n'; termBuffer[termLength++] = 'u'; termBuffer[termLength++] = 'l'; termBuffer[termLength++] = 'l'; return this; }
private CharTermAttribute appendNull() { resizeBuffer(termLength + 4); termBuffer[termLength++] = 'n'; termBuffer[termLength++] = 'u'; termBuffer[termLength++] = 'l'; termBuffer[termLength++] = 'l'; return this; }
@Override public final CharTermAttribute append(char c) { resizeBuffer(termLength + 1)[termLength++] = c; return this; }
@Override public final CharTermAttribute append(char c) { resizeBuffer(termLength + 1)[termLength++] = c; return this; }
@Override public final CharTermAttribute append(char c) { resizeBuffer(termLength + 1)[termLength++] = c; return this; }
@Override public final CharTermAttribute append(String s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(StringBuilder s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(String s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(StringBuilder s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(String s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(StringBuilder s) { if (s == null) // needed for Appendable compliance return appendNull(); final int len = s.length(); s.getChars(0, len, resizeBuffer(termLength + len), termLength); termLength += len; return this; }
@Override public final CharTermAttribute append(CharTermAttribute ta) { if (ta == null) // needed for Appendable compliance return appendNull(); final int len = ta.length(); System.arraycopy(ta.buffer(), 0, resizeBuffer(termLength + len), termLength, len); termLength += len; return this; }
@Override public final CharTermAttribute append(CharTermAttribute ta) { if (ta == null) // needed for Appendable compliance return appendNull(); final int len = ta.length(); System.arraycopy(ta.buffer(), 0, resizeBuffer(termLength + len), termLength, len); termLength += len; return this; }
@Override public final CharTermAttribute append(CharTermAttribute ta) { if (ta == null) // needed for Appendable compliance return appendNull(); final int len = ta.length(); System.arraycopy(ta.buffer(), 0, resizeBuffer(termLength + len), termLength, len); termLength += len; return this; }