Top Fields Constructors Methods
org.reactfx

pack-priv Class DefaultEventStream<T>

extends EventStreamBase<T>
Class Inheritance
Imports
java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private final T
private final EventStream<T>
private T

Constructor Summary

AccessConstructor and Description
public
DefaultEventStream(EventStream<T> input, T initial)

Method Summary

Modifier and TypeMethod and Description
protected void
newObserver(Consumer<? super T> observer)

Overrides org.reactfx.ObservableBase.newObserver.

Called for each new observer.

protected final Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

Field Detail

emittedback to summary
private boolean emitted
firstObserverback to summary
private boolean firstObserver
initialback to summary
private final T initial
inputback to summary
private final EventStream<T> input
latestEventback to summary
private T latestEvent

Constructor Detail

DefaultEventStreamback to summary
public DefaultEventStream(EventStream<T> input, T initial)

Method Detail

newObserverback to summary
protected void newObserver(Consumer<? super T> observer)

Overrides org.reactfx.ObservableBase.newObserver.

Doc from org.reactfx.ObservableBase.newObserver.

Called for each new observer. Overriding this method is a convenient way for subclasses to handle this event, for example to publish some initial events.

This method is called after the observeInputs() method.

Annotations
@Override
observeInputsback to summary
protected final Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before newObserver(Object) is called for the first observer.

Annotations
@Override