/** Sheds any excess capacity above and beyond the current size of the list. */ public LongSequence trimToSize() { if (data.length > size()) { long[] tmp = new long[size()]; toNativeArray(tmp, 0, tmp.length); data = tmp; } return this; }
/** * Copies a slice of the list into a native array. * * @param offset the offset at which to start copying * @param len the number of values to copy. * @return an <code>long[]</code> value */ public long[] toNativeArray(int offset, int len) { long[] rv = new long[len]; toNativeArray(rv, offset, len); return rv; }