Interface BuildableTransitionBuilder
public interface BuildableTransitionBuilder
Builder interface for configuring optional properties of Transition instances. This builder is
typically returned by mandatory builders and provides optional configuration.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionautoExecute(boolean autoExecute) Sets whether this transition should be executed automatically.build()Builds the Transition instance with all configured properties.metaAttributes(Map<String, String> metaAttributes) Sets the meta attributes for this transition.withConditionalResult(Consumer<ConditionalResultBuilder> conditionalResult) Adds a conditional result to this transition using the provided conditional result builder consumer.withDefaultResult(Consumer<DefaultResultBuilder> defaultResult) Adds a default result to this transition using the provided result builder consumer.withGuards(Conditions.Operator operator, Consumer<ConditionsBuilder> guards) Adds guard conditions to this transition using the specified operator and conditions builder consumer.withPostFunction(Consumer<FunctionBuilder> function) Adds a post-function to this transition using the provided function builder consumer.withPreFunction(Consumer<FunctionBuilder> function) Adds a pre-function to this transition using the provided function builder consumer.withValidator(Consumer<ValidatorBuilder> validator) Adds a validator to this transition using the provided validator builder consumer.
-
Method Details
-
metaAttributes
Sets the meta attributes for this transition.- Parameters:
metaAttributes- the metadata attributes for this transition- Returns:
- this builder for method chaining
-
autoExecute
Sets whether this transition should be executed automatically.- Parameters:
autoExecute- true if the transition should execute automatically, false otherwise- Returns:
- this builder for method chaining
-
build
Transition build()Builds the Transition instance with all configured properties.- Returns:
- a new Transition instance
-
withDefaultResult
Adds a default result to this transition using the provided result builder consumer.- Parameters:
defaultResult- consumer to configure the default result- Returns:
- this builder for method chaining
-
withConditionalResult
BuildableTransitionBuilder withConditionalResult(Consumer<ConditionalResultBuilder> conditionalResult) Adds a conditional result to this transition using the provided conditional result builder consumer.- Parameters:
conditionalResult- consumer to configure the conditional result- Returns:
- this builder for method chaining
-
withGuards
BuildableTransitionBuilder withGuards(Conditions.Operator operator, Consumer<ConditionsBuilder> guards) Adds guard conditions to this transition using the specified operator and conditions builder consumer.- Parameters:
operator- the operator for combining guard conditionsguards- consumer to configure the guard conditions- Returns:
- this builder for method chaining
-
withPreFunction
Adds a pre-function to this transition using the provided function builder consumer.- Parameters:
function- consumer to configure the pre-function- Returns:
- this builder for method chaining
-
withPostFunction
Adds a post-function to this transition using the provided function builder consumer.- Parameters:
function- consumer to configure the post-function- Returns:
- this builder for method chaining
-
withValidator
Adds a validator to this transition using the provided validator builder consumer.- Parameters:
validator- consumer to configure the validator- Returns:
- this builder for method chaining
-