/** Appends the supplied CharWrap object onto the end of this CharWrapVector. * @param toappend The CharWrap to be appended. */ public void append(CharWrap toappend) { if (filled == storage.length) expand(storage.length * 2); storage[filled] = toappend; filled++; }
/** Appends the specified portion of the supplied CharWrapVector onto the end of this * CharWrapVector. * @param other The CharWrapVector holding the CharWraps to be appended. * @param offset The start index of the CharWraps to be appended. * @param length The number of CharWraps to be appended. */ public void append(CharWrapVector other, int offset, int length) { if (filled + length > storage.length) expand(filled + length > storage.length * 2? filled + length : storage.length * 2); /* Logger.println("About to call System.arraycopy: ol "+other.storage.length+" offset " +offset+" l "+storage.length+" filled "+filled+" length "+length, Logger.DEBUG_INFORMATIONAL); */ System.arraycopy(other.storage, offset, storage, filled, length); filled += length; }