|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ReallyCloneable
Interface for cloneable objects.
This interface declares/unhides the public method
for making an instance "exact" copy (unlike
Cloneable interface which is only tagging). The
standard Cloneable interface is extended here to
allow the proper usage of native clone() method of
Object class (without throwing
CloneNotSupportedException) Important notes: the
classes which implement this interface should also override the
standard equals(Object) and hashCode()
methods.
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
| Method Detail |
|---|
java.lang.Object clone()
this object.
By the clone() standard definition, this method
creates a new instance of the class of this object and
initializes all its fields with exactly the contents of the
corresponding fields of this object. Typically, native
clone() method of Object class is used
inside this method.
null and != this) of
this instance.
java.lang.OutOfMemoryError - if there is not enough memory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||