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

org.javabits.yar.guice.KeyEvent Maven / Gradle / Ivy

There is a newer version: 3.0.1.RELEASE
Show newest version
package org.javabits.yar.guice;

import java.util.EventObject;

/**
 * TODO comment
 * Date: 5/30/13
 * Time: 9:29 AM
 *
 * @author Romain Gilles
 */
public class KeyEvent extends EventObject {

    private final T key;

    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException
     *          if source is null.
     */
    private KeyEvent(T source) {
        super(source);
        key = source;
    }

    public T key() {
        return key;
    }

    public static  KeyEvent newKeyEvent(T key) {
        return new KeyEvent<>(key);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy