A monad abstraction that can be used to build up a chain of transformations of state.
A monad abstraction that can be used to build up a chain of transformations of state. An input state can then be passed through the pipeline with the run method.
The state is queried for success via the trait StageResult.
If the state does not report as success after executing a stage, the rest of the pipeline is bypassed.
case class State(override val success: Boolean = true, value: Int = 0) extends SuccessState val pipeline = for ( _ <- Pipeline.Stage((a: State) => a.copy(value = a.value + 1)); _ <- Pipeline.Stage((a: State) => a.copy(value = a.value + 10)); finalState <- Pipeline.Stage((a: State) => a.copy(value = a.value + 100)) ) yield finalState println(pipeline.run(State())) // Will print State(true,111)
The type of the state to be threaded through pipeline stages.
Bidirectional map supporting multiple values for a single key.
Bidirectional map supporting multiple values for a single key.
This class is used in Table to map between rows and columns and their types.
The iteration order is determined by the keyOrdering implicit.
The fact that the map is ordered by keys is useful in Table because then the columns and rows will be ordered naturally in both the forward and reverse maps.
The ordering of values in reverse map is defined by the key order taking into account the first key on which each value occurs.
This class uses Scala's SortedMap under the hood.
A trait that captures whether some state during some computation is considered successful.
A trait that captures whether some state during some computation is considered successful.
This is used by Pipeline.
This package contains some classes used by this CSV library, but which are not directly related to processing CSV data.
Contents of this package should not be used outside of this library.