Exemplo n.º 1
0
 public StreamEmitter<T> createEmitter() {
   synchronized (generator) {
     return StreamEmitter.safeCast(generator.get());
   }
 }
Exemplo n.º 2
0
 public <R> Publisher<R> transform(final Operator<? super T, ? extends R> operator) {
   return Publishers.create(
       () -> {
         return StreamEmitter.safeCast(operator.apply(createEmitter()));
       });
 }