Stream.Custom.Pipeline.ParallelFlow
This is a base for parallel Flow implementations
In Scalqa it is allowed to setup custom parallel calculations engine, and this class is reccomended way to start
- Source
- ParallelFlow.scala
Def
Reverse filter
Reverse filter
Disallows Stream.Flow elements satisfying the given function
- Inherited from
- _build
- Source
- _build.scala
Find optional any value
Find optional any value
Finds any value or returns void option if not found
- Inherited from
- _use
- Source
- _use.scala
Flat map
Flat map
Creates a new Stream.Flow by applying given function to all elements of current Stream.Flow and concatenating the results
- Inherited from
- _build
- Source
- _build.scala
Fold and convert
Fold and convert
Folds and converts elements with a binary function
- Value Params
- f
binary function to fold elements with
- start
seed value to start with
- Inherited from
- _use
- Source
- _use.scala
Process flow
Process flow
Applies given function to each flow element
- Inherited from
- _use
- Source
- _use.scala
Simple map
Simple map
Creates a new Stream.Flow where each element is a result of applying given function to current Stream.Flow elements
- Inherited from
- _build
- Source
- _build.scala
Inspect
Inspect
The given function will be run for every passing stream flow element.
- Inherited from
- _build
- Source
- _build.scala
Optional reduce
Optional reduce
Folds elements with a binary function or returns empty option when stream is empty
- Value Params
- f
binary function to fold elements with
- Inherited from
- _use
- Source
- _use.scala
Optional long size
Optional long size
Many streams can return their current element count. If the information is not available, void option is returned
var s = (Int.min.Long <> Int.max.toLong).stream
s.sizeLongOpt.tp // Prints Long.Opt(4294967296)
s = s.take(_ > 10) // static sizing is lost
s.sizeLongOpt.tp // Prints Long.Opt(VOID)
- Inherited from
- _metadata
- Source
- _metadata.scala
Optional size
Optional size
Many streams can return their current element count. If the information is not available, void option is returned
Note: If size is known, but exceeds integer range, void option is returned. For theses cases use sizeLongOpt
var s = ('a' <> 'z').stream
s.sizeOpt.tp // Prints Int.Opt(26)
s = s.take(_ > 10) // static sizing is lost
s.sizeOpt.tp // Prints Int.Opt(VOID)
- Inherited from
- _metadata
- Source
- _metadata.scala
Filter
Filter
Only allow Stream.Flow elements satisfying the given function
- Inherited from
- _build
- Source
- _build.scala