Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 public static LongSequence from(long... array) {
   LongSequence seq = new LongSequence(0);
   seq.data = array;
   seq.pos = array.length;
   return seq;
 }