public interface DeepCopyable
deepCopy()
in the interface (class)
itself to provide as much information as possible to avoid unnecessary casting.
For example,
public interface Matrix extends DeepCopyable {
...
Matrix deepCopy();
}
Modifier and Type | Method and Description |
---|---|
Object |
deepCopy()
The implementation returns an instance created from
this by the copy
constructor of the class, or just this if the instance itself is
immutable. |
Object deepCopy()
this
by the copy
constructor of the class, or just this
if the instance itself is
immutable.Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.