unsafeFlatMap
open fun <R : IntervalLike<R>, RESULT : GeneralOps<R, RESULT>> unsafeFlatMap(ctor: (Timeline<R, RESULT>) -> RESULT, boundsTransformer: BoundsTransformer, truncate: Boolean, f: (V) -> Segment<GeneralOps<R, *>>): RESULT
(DOC) UNSAFE! Maps each object to a nested timeline and flattens all the timelines into one.
Very similar to unsafeMap, except that the result of the mapper function is a Segment containing a timeline. After each object is mapped, each nested timeline will be collected on its segment's interval, and flattened together into a single timeline.
Parameters
R
the result payload type
RESULT
the result timeline type
ctor
the constructor of the result timeline
boundsTransformer
how to transform the bounds for the timeline map is called on
truncate
whether to truncate the result before returning
f
a mapper function that converts each timeline object to a segment of a nested timeline
See also
for explanation of boundsTransformer and truncate
for an explanation of why this method is unsafe.