|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface DeepCopyable
This interface provides a way to do polymorphic copying.
Note: an interface (a class) which extends (implements) this interface should
override the return type of deepCopy() to the interface (class)
itself to provide as much information as possible to avoid unnecessary casting.
For example,
public interface Matrix extends DeepCopyable {
...
Matrix deepCopy();
}
| Method Summary | |
|---|---|
java.lang.Object |
deepCopy()
The implementation can return an instance created from this by the copy
constructor of the class, or just this if the instance itself is
immutable. |
| Method Detail |
|---|
java.lang.Object deepCopy()
this by the copy
constructor of the class, or just this if the instance itself is
immutable.
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||