Interface HasParent<T extends Model<T,?>,P extends Model<?,?>>

Type Parameters:
T - the type of the child model element
P - the type of the parent model element
All Known Subinterfaces:
Capability, Condition, ConditionalResult, Conditions, DefaultResult, Fork, Function, Join, Register, State, Transition, Validator

public interface HasParent<T extends Model<T,?>,P extends Model<?,?>>
Interface for model elements that have a parent-child relationship with other model elements. HasParent provides the contract for establishing and managing hierarchical relationships in the workflow model structure.

Parent-child relationships are fundamental to the workflow model hierarchy, where elements like states contain transitions, workflows contain states, and transitions contain results. This interface enables the creation of new instances with different parent relationships.

The interface uses generic type parameters to ensure type safety in the parent-child relationship, where T represents the child type and P represents the parent type.

Since:
1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    withParent(P parent)
    Creates a new instance of this model element with the specified parent.
  • Method Details

    • withParent

      T withParent(P parent)
      Creates a new instance of this model element with the specified parent. This method enables changing the parent-child relationship without modifying the original instance.
      Parameters:
      parent - the new parent for this model element
      Returns:
      a new instance with the specified parent