tmf: Move timestamps to their own package
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / uml2sd / TmfSyncSequenceDiagramEvent.java
index 6cba15e48785729aa5388fb0dcc03ee4b6ce413c..dd084a8eef5bc7ad86906de592bdb1e33974b2fd 100644 (file)
@@ -1,41 +1,63 @@
 /**********************************************************************
  * Copyright (c) 2011 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.core.uml2sd;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
- * <b><u>TmfSyncSequenceDiagramEvent</u></b>
  * <p>
- * Sample implementation of the ITmfSyncSequenceDiagramEvent
+ * A basic implementation of ITmfSyncSequenceDiagramEvent.
  * </p>
+ *
+ * @version 1.0
+ * @author Bernd Hufmann
  */
 public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent {
 
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
+    /**
+     * The start time of the sequence diagram event (i.e. time when signal was sent).
+     */
     final protected ITmfTimestamp fStartTime;
+    /**
+     * The name of the sender of the signal.
+     */
     final protected String fSender;
+    /**
+     * The name of the receiver of the signal.
+     */
     final protected String fReceiver;
+    /**
+     * The name of the signal
+     */
     final protected String fName;
-    
+
     // ------------------------------------------------------------------------
     // Constructors
-    // ------------------------------------------------------------------------    
-    public TmfSyncSequenceDiagramEvent(TmfEvent startEvent, String sender, String receiver, String name) {
+    // ------------------------------------------------------------------------
+    /**
+     * Constructor
+     *
+     * @param startEvent The start event (on sender side).
+     * @param sender The name of sender of signal.
+     * @param receiver The Name of receiver of signal.
+     * @param name - The signal name
+     */
+    public TmfSyncSequenceDiagramEvent(ITmfEvent startEvent, String sender, String receiver, String name) {
 
-        if (startEvent == null || sender == null || receiver == null || name == null) {
+        if ((startEvent == null) || (sender == null) || (receiver == null) || (name == null)) {
             throw new IllegalArgumentException("TmfSyncSequenceDiagramEvent constructor: " +  //$NON-NLS-1$
                     (startEvent == null ? ", startEvent=null" : "") + //$NON-NLS-1$ //$NON-NLS-2$
                     (sender == null ? ", sender=null" : "") + //$NON-NLS-1$ //$NON-NLS-2$
@@ -43,20 +65,20 @@ public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent
                     (name == null ? ", name=null" : "")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
-        fStartTime = startEvent.getTimestamp().clone();
+        fStartTime = startEvent.getTimestamp();
 
         fSender = sender;
         fReceiver = receiver;
-        
+
         fName = name;
     }
 
     // ------------------------------------------------------------------------
     // Operations
-    // ------------------------------------------------------------------------    
+    // ------------------------------------------------------------------------
     /*
      * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.uml2sd.ITmfSyncSequenceDiagramEvent#getSender()
+     * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getSender()
      */
     @Override
     public String getSender() {
@@ -65,7 +87,7 @@ public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent
 
     /*
      * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.uml2sd.ITmfSyncSequenceDiagramEvent#getReceiver()
+     * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getReceiver()
      */
     @Override
     public String getReceiver() {
@@ -74,16 +96,15 @@ public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent
 
     /*
      * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.uml2sd.ITmfSyncSequenceDiagramEvent#getName()
+     * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getName()
      */
     @Override
     public String getName() {
         return fName;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.uml2sd.ITmfSyncSequenceDiagramEvent#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
This page took 0.027259 seconds and 5 git commands to generate.