/**
 * An encapsulation of an Event
 *
 * This implementation is generic so that the two
 * variants, event listening and event bubbling, can
 * have their own type of Event.
 *
 * The type parameter, S, is used to bind the type of the 
 * source.  It can be either EventGenerator  (for event 
 * listening) or EventHandler (for event bubbling).
 *
 * This class has package visibility to prevent it
 * from being typed inappropriately in classes
 * outside of this package.
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
class Event<S>
{
    private S          source;
    private String     name, value;
    

    /**
     * Explicit Value Constructor
     *
     * @param source   The source of this Event
     * @param name     The name of this Event
     * @param value    The value of this Event
     */
    public Event(S source, String name, String value)
    {
       this.source = source;
       this.name   = name;
       this.value  = value;       
    }


    /**
     * Get the source of this Event
     *
     * @return    The source
     */
    protected S getSource()
    {
       return source;       
    }


    /**
     * Get the name of this Event
     *
     * @return    The name
     */
    public String getName()
    {
       return name;       
    }


    /**
     * Get the value of this Event
     *
     * @return    The value
     */
    public String getValue()
    {
       return value;       
    }
}
