View Javadoc

1   package cz.cuni.amis.pogamut.defcon.communication.messages.infos;
2   
3   import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent;
4   import cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent;
5   
6   import javabot.events.IDefConBasicEvent;
7   
8   
9   /**
10   * Event message for arbitrary world that is run in the same JVM.
11   */
12  public class DefConEvent implements IDefConBasicEvent, IWorldEvent {
13      /**
14       * DOCUMENT ME!
15       */
16      private double time;
17  
18      /**
19       * Creates a new DefConEvent object.
20       */
21      public DefConEvent() {
22      }
23  
24      /**
25       * Creates a new DefConEvent object.
26       *
27       * @param time DOCUMENT ME!
28       */
29      public DefConEvent(double time) {
30          this.time = time;
31      }
32  
33      /**
34       * DOCUMENT ME!
35       *
36       * @return DOCUMENT ME!
37       */
38      public double getTime() {
39          return time;
40      }
41  
42      /**
43       * DOCUMENT ME!
44       *
45       * @return DOCUMENT ME!
46       */
47      public String getStringizedFields() {
48          return "time: " + time;
49      }
50  
51      // TODO: FIX!
52      /**
53       * DOCUMENT ME!
54       *
55       * @return DOCUMENT ME!
56       */
57      @Override
58      public long getSimTime() {
59          return (long) time;
60      }
61  }