/** * Returns a clone of this list. Since this is a primitive collection, this will be a deep clone. * * @return a deep clone of the list. */ public Object clone() { LongSequence list = null; try { list = (LongSequence) super.clone(); list.data = toNativeArray(); } catch (CloneNotSupportedException e) { // it's supported } // end get try-catch return list; }
public static LongSequence from(long... array) { LongSequence seq = new LongSequence(0); seq.data = array; seq.pos = array.length; return seq; }