Interface BuildableStateBuilder


public interface BuildableStateBuilder
Builder interface for configuring optional properties of State instances. This builder is typically returned by mandatory builders and provides optional configuration.
Since:
1.0
See Also:
  • Method Details

    • capabilities

      BuildableStateBuilder capabilities(Iterable<Capability> capabilities)
      Sets the capabilities for this state using an iterable collection.
      Parameters:
      capabilities - the capabilities available in this state
      Returns:
      this builder for method chaining
    • preFunctions

      BuildableStateBuilder preFunctions(Iterable<Function> preFunctions)
      Sets the pre-functions for this state using an iterable collection.
      Parameters:
      preFunctions - the functions to execute when entering this state
      Returns:
      this builder for method chaining
    • transitions

      BuildableStateBuilder transitions(Iterable<Transition> transitions)
      Sets the transitions for this state using an iterable collection of pre-built transitions.
      Parameters:
      transitions - the transitions available from this state
      Returns:
      this builder for method chaining
    • withCommonTransition

      BuildableStateBuilder withCommonTransition(TransitionId commonTransitionId)
      Sets the common transition IDs for this state using varargs. Common transitions are available from multiple states.
      Parameters:
      commonTransitionId - the ID of common transition available from this state
      Returns:
      this builder for method chaining
    • metaAttributes

      BuildableStateBuilder metaAttributes(Map<String,String> metaAttributes)
      Sets the meta attributes for this state.
      Parameters:
      metaAttributes - the metadata attributes for this state
      Returns:
      this builder for method chaining
    • build

      State build()
      Builds the State instance with all configured properties.
      Returns:
      a new State instance
    • withTransition

      BuildableStateBuilder withTransition(Consumer<TransitionBuilder> transition)
      Adds a transition to this state using the provided transition builder consumer.
      Parameters:
      transition - consumer to configure the transition
      Returns:
      this builder for method chaining
    • withoutTransition

      BuildableStateBuilder withoutTransition(TransitionId transitionId)
      Removes a transition from this state.
      Parameters:
      transitionId - the ID of the transition to remove
      Returns:
      this builder for method chaining
    • modifyTransition

      BuildableStateBuilder modifyTransition(TransitionId transitionId, Consumer<BuildableTransitionBuilder> transition)
      Modifies an existing transition in this state using the provided transition builder consumer.
      Parameters:
      transitionId - the ID of the transition to modify
      transition - consumer to configure the modified transition
      Returns:
      this builder for method chaining
    • withPreFunction

      BuildableStateBuilder withPreFunction(Consumer<FunctionBuilder> function)
      Adds a pre-function to this state using the provided function builder consumer.
      Parameters:
      function - consumer to configure the pre-function
      Returns:
      this builder for method chaining
    • withPostFunction

      BuildableStateBuilder withPostFunction(Consumer<FunctionBuilder> function)
      Adds a post-function to this state using the provided function builder consumer.
      Parameters:
      function - consumer to configure the post-function
      Returns:
      this builder for method chaining