Package me.croabeast.common
Interface Copyable<T>
- Type Parameters:
T- the type of the object to be copied.
- All Known Subinterfaces:
Mappable<T,,C, B> Mappable.BaseList<T,,B> Mappable.BaseSet<T,,B> SectionMappable<C,,S> SectionMappable.List,SectionMappable.Set,UnitMappable<U,,C, UM> UnitMappable.List<U>,UnitMappable.Set<U>
- All Known Implementing Classes:
HashMappable
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.
-