Class CopyCtorCopier

  • All Implemented Interfaces:
    Copier

    public class CopyCtorCopier
    extends Object
    implements Copier
    Copier that copies an object using its copy constructor.

    A copy constructor is a constructor that takes an object of the same type as the object that's to be constructed. This constructor then initializes itself using the values of this other instance.

    Since:
    2.0
    Author:
    Arjan Tijms
    • Constructor Detail

      • CopyCtorCopier

        public CopyCtorCopier()
    • Method Detail

      • copy

        public Object copy​(Object object)
        Description copied from interface: Copier
        Return an object that's logically a copy of the given object.

        Specified by:
        copy in interface Copier
        Parameters:
        object - the object to be copied
        Returns:
        a copy of the given object