Package me.croabeast.common
Interface Copyable<T>
- Type Parameters:
T- the type of the object to be copied.
- All Known Subinterfaces:
MultiComponent
- All Known Implementing Classes:
CollectionBuilder,MessageSender
public interface Copyable<T>
A generic interface that defines a method for creating a copy of an object.
Classes that implement Copyable provide their own implementation of the copy() method,
returning a new instance that is a copy of the original object. This can be useful for creating
deep or shallow copies of objects as needed.
-
Method Summary
-
Method Details
-
copy
Creates and returns a copy of this object.- Returns:
- a new instance that is a copy of this object.
-