SwitchMapStreamTransformer<T, S> constructor

SwitchMapStreamTransformer<T, S>(Stream<S> mapper(T value))

Constructs a StreamTransformer which maps each event from the source Stream using mapper.

The mapped Stream will be be listened to and begin emitting items, and any previously created mapper Streams will stop emitting.

Implementation

SwitchMapStreamTransformer(Stream<S> mapper(T value))
    : _transformer = _buildTransformer(mapper);