Interface CanCopy<T>
- Type Parameters:
T- the type of object that can be copied (typically the implementing class)
- All Known Subinterfaces:
Capability,Condition,ConditionalResult,Conditions,DefaultResult,Fork,Function,Join,Model<SELF,,ID> MutableWorkflowDefinition,Register,Result<E>,State,Transition,Validator,WorkflowDefinition
public interface CanCopy<T>
Interface for objects that can create copies of themselves. CanCopy provides the contract for
creating deep or shallow copies of workflow model elements, enabling safe manipulation and
modification of workflow definitions.
Copying is essential in workflow systems for creating modified versions of workflow definitions, implementing undo/redo functionality, and safely manipulating workflow structures without affecting the original instances.
The copy operation should create a new instance that is independent of the original, allowing modifications to be made without side effects. The exact semantics of copying (deep vs shallow) depend on the implementation.
- Since:
- 1.0
- See Also:
-
Method Summary
-
Method Details
-
copy
T copy()Creates a copy of this object. The returned object should be independent of the original, allowing modifications without side effects.- Returns:
- a copy of this object
-