net.sf.ivmaidns.util
Interface ReallyCloneable

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
BooleanVector, ByteVector, CharVector, ConstPair, ConstVector, DNSMsgHeader, DNSName, DNSRecord, DoubleVector, FilterStorage, FloatVector, HashedStorage, IntStorage, IntVector, ListStorage, LongVector, ObjectStorage, ObjectVector, PseudoRandom, ShortVector, SortedStorage, Storage, StorageEnumerator, StorageEvent, TreeStorage, UnsignedInt, UnsignedLong

public interface ReallyCloneable
extends java.lang.Cloneable

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.

Since:
2.0
Version:
2.0
Author:
Ivan Maidanski

Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 

Method Detail

clone

java.lang.Object clone()
Creates and returns a copy of 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.

Returns:
a copy (not null and != this) of this instance.
Throws:
java.lang.OutOfMemoryError - if there is not enough memory.