// This example is from the book Developing Java Beans by Robert Englander.
// Copyright (c) 1997 O'Reilly & Associates.
// You may study, use, modify, and distribute this example for any purpose.
// This example is provided WITHOUT WARRANTY either expressed or implied.
// Chapter 8 -- The TemperaturePulseEvent class
package BeansBook.Simulator;
// class definition for the temperature pulse event
public class TemperaturePulseEvent
extends java.util.EventObject
{
// the pulse temperature
protected double theTemp;
// constructor
public TemperaturePulseEvent(Object source, double t)
{
// pass the source to the superclass
super(source);
// save the temperature
theTemp = t;
}
// return the pulse temperature
public double getPulseTemperature()
{
return theTemp;
}
}
|