Chain: Chain class

Description Active bindings Methods Examples

Description

Chain is a logical group of states, that resembles a linked list. The start state is the head of the *Chain* and the end state is the tail of the *Chain*.

Active bindings

state_id

Chain class state_id

Methods

Public methods


Method new()

Initialise Chain class

Usage
Chain$new(steps = list())
Arguments
steps

(list(State), optional): List of states to be chained in-order. (default: list())

Examples
library(stepfunctions)
s1_pass = Pass$new('Step - One')
s2_pass = Pass$new('Step - two')
s3_pass = Pass$new('Step - three')
chain1 = Chain$new(c(s1_pass, s2_pass))
chain2 = Chain$new(c(s3_pass, chain1))

Method append()

Add a state at the tail end of the chain.

Usage
Chain$append(step)
Arguments
step

(State): State to insert at the tail end of the chain.


Method accept()

placeholder

Usage
Chain$accept(visitor)
Arguments
visitor

placeholder


Method format()

class formatting

Usage
Chain$format()

Method clone()

The objects of this class are cloneable with this method.

Usage
Chain$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## ------------------------------------------------
## Method `Chain$new`
## ------------------------------------------------

library(stepfunctions)
s1_pass = Pass$new('Step - One')
s2_pass = Pass$new('Step - two')
s3_pass = Pass$new('Step - three')
chain1 = Chain$new(c(s1_pass, s2_pass))
chain2 = Chain$new(c(s3_pass, chain1))

DyfanJones/aws-step-functions-data-science-sdk-r documentation built on Dec. 17, 2021, 5:31 p.m.