java.lang.Object
com.dassault_systemes.modeler.sysml.model.IfActions

@OpenApiAll public class IfActions extends Object
Utility class providing helper methods for accessing and creating input parameters of an IfActionUsage. These parameters correspond to the condition expression, the “then” action, and the “else” action.
  • Field Details

    • IF_ARGUMENT_PARAMETER_INDEX

      public static final int IF_ARGUMENT_PARAMETER_INDEX
      Index of the condition (if‑argument) input parameter.
      See Also:
    • THEN_ACTION_PARAMETER_INDEX

      public static final int THEN_ACTION_PARAMETER_INDEX
      Index of the “then” action input parameter.
      See Also:
    • ELSE_ACTION_PARAMETER_INDEX

      public static final int ELSE_ACTION_PARAMETER_INDEX
      Index of the “else” action input parameter.
      See Also:
  • Constructor Details

    • IfActions

      public IfActions()
  • Method Details

    • getOrCreateIfArgument

      public static Expression getOrCreateIfArgument(IfActionUsage actionUsage, Supplier<Expression> parameterFactory)
      Returns the condition expression of the IfActionUsage, creating it if necessary using the supplied factory.
      Parameters:
      actionUsage - the if‑action usage whose condition is requested
      parameterFactory - factory used to create the expression if missing
      Returns:
      existing or newly created condition expression
    • getOrCreateThenAction

      public static ActionUsage getOrCreateThenAction(IfActionUsage actionUsage, Supplier<ActionUsage> parameterFactory)
      Returns the “then” action of the IfActionUsage, creating it if necessary using the supplied factory.
      Parameters:
      actionUsage - the if‑action usage whose then‑action is requested
      parameterFactory - factory used to create the action if missing
      Returns:
      existing or newly created then‑action
    • getOrCreateElseAction

      public static ActionUsage getOrCreateElseAction(IfActionUsage actionUsage, Supplier<ActionUsage> parameterFactory)
      Returns the “else” action of the IfActionUsage, creating it if necessary using the supplied factory.
      Parameters:
      actionUsage - the if‑action usage whose else‑action is requested
      parameterFactory - factory used to create the action if missing
      Returns:
      existing or newly created else‑action