All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.reactfx.ProperEventStream Maven / Gradle / Ivy

There is a newer version: 1.11
Show newest version
package org.reactfx;

import java.util.function.Consumer;

import org.reactfx.util.NotificationAccumulator;

/**
 * Trait to be mixed into {@link ObservableBase} to obtain default
 * implementation of some {@link EventStream} methods on top of
 * {@linkplain Observable} methods and get additional helper methods for
 * proper event streams implemented as default methods on top of
 * {@linkplain ProperObservable} methods.
 */
public interface ProperEventStream
extends EventStream, ProperObservable, T> {

    default void emit(T value) {
        notifyObservers(value);
    }

    @Override
    default NotificationAccumulator, T, ?> defaultNotificationAccumulator() {
        return NotificationAccumulator.nonAccumulativeStreamNotifications();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy