Class WhileLoopActions
java.lang.Object
com.dassault_systemes.modeler.sysml.model.WhileLoopActions
Utility class providing helper methods for
WhileLoopActionUsage-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndex of the loop body argument.static final intIndex of the "until" condition argument.static final intIndex of the "while" condition argument. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionUsagegetOrCreateBodyAction(WhileLoopActionUsage actionUsage, Supplier<ActionUsage> parameterFactory) Returns the loop body action of the action usage, creating it if necessary.static ExpressiongetOrCreateUntilArgument(WhileLoopActionUsage actionUsage, Supplier<Expression> parameterFactory) Returns the "until" condition expression of the action usage, creating it if necessary.static ExpressiongetOrCreateWhileArgument(WhileLoopActionUsage actionUsage, Supplier<Expression> parameterFactory) Returns the "while" condition expression of the action usage, creating it if necessary.
-
Field Details
-
WHILE_ARGUMENT_PARAMETER_INDEX
public static final int WHILE_ARGUMENT_PARAMETER_INDEXIndex of the "while" condition argument.- See Also:
-
BODY_ARGUMENT_PARAMETER_INDEX
public static final int BODY_ARGUMENT_PARAMETER_INDEXIndex of the loop body argument.- See Also:
-
UNTIL_ARGUMENT_PARAMETER_INDEX
public static final int UNTIL_ARGUMENT_PARAMETER_INDEXIndex of the "until" condition argument.- See Also:
-
-
Constructor Details
-
WhileLoopActions
public WhileLoopActions()
-
-
Method Details
-
getOrCreateWhileArgument
public static Expression getOrCreateWhileArgument(WhileLoopActionUsage actionUsage, Supplier<Expression> parameterFactory) Returns the "while" condition expression of the action usage, creating it if necessary.- Parameters:
actionUsage- the while-loop action usageparameterFactory- factory used to create the expression if missing- Returns:
- existing or newly created while-condition expression
-
getOrCreateBodyAction
public static ActionUsage getOrCreateBodyAction(WhileLoopActionUsage actionUsage, Supplier<ActionUsage> parameterFactory) Returns the loop body action of the action usage, creating it if necessary.- Parameters:
actionUsage- the while-loop action usageparameterFactory- factory used to create the body action if missing- Returns:
- existing or newly created body action
-
getOrCreateUntilArgument
public static Expression getOrCreateUntilArgument(WhileLoopActionUsage actionUsage, Supplier<Expression> parameterFactory) Returns the "until" condition expression of the action usage, creating it if necessary.- Parameters:
actionUsage- the while-loop action usageparameterFactory- factory used to create the expression if missing- Returns:
- existing or newly created until-condition expression
-