Interface ConditionalSpecification.Builder

    • Method Detail

      • active

        ConditionalSpecification.Builder active​(Boolean active)

        Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.

        Parameters:
        active - Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conditionalBranches

        ConditionalSpecification.Builder conditionalBranches​(Collection<ConditionalBranch> conditionalBranches)

        A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.

        Parameters:
        conditionalBranches - A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conditionalBranches

        ConditionalSpecification.Builder conditionalBranches​(ConditionalBranch... conditionalBranches)

        A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.

        Parameters:
        conditionalBranches - A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conditionalBranches

        ConditionalSpecification.Builder conditionalBranches​(Consumer<ConditionalBranch.Builder>... conditionalBranches)

        A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.

        This is a convenience method that creates an instance of the ConditionalBranch.Builder avoiding the need to create one manually via ConditionalBranch.builder() .

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #conditionalBranches(List).

        Parameters:
        conditionalBranches - a consumer that will call methods on ConditionalBranch.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #conditionalBranches(java.util.Collection)
      • defaultBranch

        ConditionalSpecification.Builder defaultBranch​(DefaultConditionalBranch defaultBranch)

        The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.

        Parameters:
        defaultBranch - The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
        Returns:
        Returns a reference to this object so that method calls can be chained together.