/** * Returns a copy of the ResizableDoubleArray. Does not contract before the copy, so the returned * object is an exact copy of this. * * @return a new ResizableDoubleArray with the same data and configuration properties as this * @since 2.0 */ public synchronized ResizableDoubleArray copy() { ResizableDoubleArray result = new ResizableDoubleArray(); copy(this, result); return result; }
/** * Copy constructor. Creates a new ResizableDoubleArray that is a deep, fresh copy of the * original. Needs to acquire synchronization lock on original. Original may not be null; * otherwise a NullPointerException is thrown. * * @param original array to copy * @since 2.0 */ public ResizableDoubleArray(ResizableDoubleArray original) { copy(original, this); }