Class ObservableMapOptional.MapOptionalObserver<T,​R>

    • Field Detail

      • mapper

        final Function<? super T,​java.util.Optional<? extends R>> mapper
    • Constructor Detail

      • MapOptionalObserver

        MapOptionalObserver​(Observer<? super R> downstream,
                            Function<? super T,​java.util.Optional<? extends R>> mapper)
    • Method Detail

      • poll

        public R poll()
               throws java.lang.Throwable
        Description copied from interface: SimpleQueue
        Tries to dequeue a value (non-null) or returns null if the queue is empty.

        If the producer uses SimpleQueue.offer(Object, Object) and when polling in pairs, if the first poll() returns a non-null item, the second poll() is guaranteed to return a non-null item as well.

        Returns:
        the item or null to indicate an empty queue
        Throws:
        java.lang.Throwable - if some pre-processing of the dequeued item (usually through fused functions) throws.