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

react.Signal Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
//
// React - a library for functional-reactive-like programming in Java
// Copyright (c) 2011, Three Rings Design, Inc. - All rights reserved.
// http://github.com/threerings/react/blob/master/LICENSE

package react;

/**
 * A signal that emits events of type {@code T}. {@link Slot}s may be connected to a signal to be
 * notified upon event emission.
 */
public class Signal extends AbstractSignal
{
    /**
     * Convenience method for creating a signal without repeating the type parameter.
     */
    public static  Signal create () {
        return new Signal();
    }

    /**
     * Causes this signal to emit the supplied event to connected slots.
     */
    public void emit (T event) {
        notifyEmit(event);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy