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 * ID for Serialization. 016 */ 017 private static final long serialVersionUID = 126622847859783807L; 018 019 /** 020 * The time to be reported. 021 * 022 * @serial 023 */ 024 private Object m_oTime; 025 026 /** 027 * The time stamp assigned at creation time. 028 * 029 * @serial 030 */ 031 private Object m_oTimeStamp; 032 033 /** 034 * Create a new TimerEvent 035 * 036 * @param tSource the source of this event 037 */ 038 public TimerEvent(Timer tSource) { 039 super(tSource); 040 041 m_oTime = tSource.getTime(); 042 m_oTimeStamp = tSource.getTimeStamp(); 043 } 044 045 /** 046 * @return an Object representing the time this event occured 047 * 048 ** @override Never 049 */ 050 public Object getTime() { 051 return m_oTime; 052 } 053 054 /** 055 * Return the time stamp for this event. 056 * 057 * <p>Thus, two TimerEvents can always be ordered according to their time of creation.</p> 058 * 059 * @override Never 060 */ 061 public Object getTimeStamp() { 062 return m_oTimeStamp; 063 } 064 }