Interface ObjectUtil

  • All Known Implementing Classes:
    ObjectUtilImpl

    public interface ObjectUtil
    Creates deep copies of arbitrary objects.
    • Method Detail

      • deepCopy

        <T> T deepCopy​(@Nullable
                       T obj)
        Creates deep copy of given object.

        Attention: Do not clone nested classes, implementations might attempt to clone the surrounding object as well!

        Type Parameters:
        T - any copyable object.
        Parameters:
        obj - the object to copy.
        Returns:
        deep copy of given object or null if obj was null.