Chain.RdChain 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*.
state_idChain class state_id
new()Initialise Chain class
Chain$new(steps = list())
steps(list(State), optional): List of states to be chained in-order. (default: list())
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))
append()Add a state at the tail end of the chain.
Chain$append(step)
step(State): State to insert at the tail end of the chain.
accept()placeholder
Chain$accept(visitor)
visitorplaceholder
format()class formatting
Chain$format()
clone()The objects of this class are cloneable with this method.
Chain$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------ ## 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))