Package ome.util.mem

Interface Copiable

  • All Known Subinterfaces:
    PlaneArea
    All Known Implementing Classes:
    CopiableArray, EllipseArea, Handle, RectangleArea

    public interface Copiable
    Requires an implementing class to provide deep copies of its instances. More precisely, an invocation of the copy method, such as y = x.copy(), is required to return an object y for which the following conditions hold true:
    • The state of y is the same as the state of x.
    • The state of any object w referenced by y is the same as the corresponding object referenced by x, and so on recursively for every object referenced by w.
    • Any subsequent state change in y or, recursively, in any other object referenced by y, is not going to affect x or recursively, any other object referenced by x.
    Note that a deep copy would satisfy the above conditions. However, a non-complete deep copy might comply with the above as well — for example immutable objects don't need to be copied.
    Since:
    OME2.2
    • Method Detail

      • copy

        java.lang.Object copy()
        Makes a copy of this object. The implementation is required to stick to the copy semantics defined by this interface.
        Returns:
        The new object.