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

org.reactfx.EventStreamHelpers Maven / Gradle / Ivy

There is a newer version: 2.0-M5
Show newest version
package org.reactfx;

import java.util.function.Consumer;

/**
 * Trait to be mixed into {@link ObservableBase} to obtain default
 * implementation of some {@link EventStream} methods and get additional
 * helper methods.
 */
public interface EventStreamHelpers
extends EventStream, ObservableHelpers, T> {

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

    @Override
    default Subscription subscribe(Consumer subscriber) {
        return observe(subscriber);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy