@Override public BooleanBigListIterator listIterator(final long index) { ensureIndex(index); return new BooleanBigListIterator() { long pos = index, last = -1;
@Override public void add(final long index, final boolean k) { ensureIndex(index); grow(size + 1); if (index != size) BooleanBigArrays.copy(a, index, a, index + 1, size - index); BooleanBigArrays.set(a, index, k); size++; assert size <= BooleanBigArrays.length(a); } @Override
/** * Adds elements to this type-specific list using optimized system calls. * * @param index * the index at which to add elements. * @param a * the big array containing the elements. * @param offset * the offset of the first element to add. * @param length * the number of elements to add. */ @Override public void addElements(final long index, final boolean a[][], final long offset, final long length) { ensureIndex(index); BooleanBigArrays.ensureOffsetLength(a, offset, length); grow(size + length); BooleanBigArrays.copy(this.a, index, this.a, index + length, size - index); BooleanBigArrays.copy(a, offset, this.a, index, length); size += length; } @Override