com.multicorebsp.core
Interface CompulsaryCloneable<T>

Type Parameters:
T - The type of the final class which should be cloneable.
All Superinterfaces:
java.lang.Cloneable

public interface CompulsaryCloneable<T>
extends java.lang.Cloneable

Interface ensuring implementation of the clone() function of implementing classes. Also a type-safe cloning function, safeClone(), will be made available. When implementing this interface, recommended is to implement the type-safe version and let clone() call and return the result of safeClone().


Method Summary
 java.lang.Object clone()
          Makes the clone method public.
 T safeClone()
          Type-safe cloning method.
 

Method Detail

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Makes the clone method public. Interface implementations should override the standard clone operation to return a deep copy of the current object; suggested is to implement:
public Object clone() { return safeClone(); }

Returns:
A cloned instance of the current object.
Throws:
java.lang.CloneNotSupportedException

safeClone

T safeClone()
Type-safe cloning method. Returns a deep copy of the current instance.

Returns:
A cloned instance of `this'.