001 package sale.events; 002 003 import sale.*; 004 005 /** 006 * An event to be fired by implementations of the {@link sale.Timer Timer} interface. 007 * 008 * @author Stephan Gambke 009 * @version 2.0 11/06/1999 010 * @since v2.0 011 */ 012 public class TimerEvent extends java.util.EventObject { 013 014 /** 015 * The time to be reported. 016 * 017 * @serial 018 */ 019 private Object m_oTime; 020 021 /** 022 * The time stamp assigned at creation time. 023 * 024 * @serial 025 */ 026 private Object m_oTimeStamp; 027 028 /** 029 * Create a new TimerEvent 030 * 031 * @param tSource the source of this event 032 */ 033 public TimerEvent(Timer tSource) { 034 super(tSource); 035 036 m_oTime = tSource.getTime(); 037 m_oTimeStamp = tSource.getTimeStamp(); 038 } 039 040 /** 041 * @return an Object representing the time this event occured 042 * 043 ** @override Never 044 */ 045 public Object getTime() { 046 return m_oTime; 047 } 048 049 /** 050 * Return the time stamp for this event. 051 * 052 * <p>Thus, two TimerEvents can always be ordered according to their time of creation.</p> 053 * 054 * @override Never 055 */ 056 public Object getTimeStamp() { 057 return m_oTimeStamp; 058 } 059 }