tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / util / TimeEventComparator.java
index 58247eac6f3a5b2c75e779acceae82c3afc0a2ae..a9bedf46ce616946940d6beb06de56833699d20d 100755 (executable)
@@ -1,15 +1,15 @@
 /**********************************************************************
- * Copyright (c) 2005, 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, 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
- * $Id: TimeEventComparator.java,v 1.2 2006/09/20 20:56:27 ewchan Exp $
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.util;
 
 import java.io.Serializable;
@@ -19,32 +19,39 @@ import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.SDTimeEvent;
 
 /**
  * Time event comparator
- * 
+ *
+ * @version 1.0
  * @author sveyrier
- * 
  */
 public class TimeEventComparator implements Comparator<SDTimeEvent>, Serializable {
 
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
     /**
      * Serial version UID
      */
     private static final long serialVersionUID = 5885497718872575669L;
 
-    /**
-     * Compares two time events. 
-     * 
-     * @return 1 if arg0 is greater, 0 if equal, -1 otherwise
+    // ------------------------------------------------------------------------
+    // Methods
+    // ------------------------------------------------------------------------
+
+    /*
+     * (non-Javadoc)
+     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
      */
     @Override
     public int compare(SDTimeEvent arg0, SDTimeEvent arg1) {
-        SDTimeEvent t1 = (SDTimeEvent) arg0;
-        SDTimeEvent t2 = (SDTimeEvent) arg1;
-        if (t1.getEvent() > t2.getEvent())
+        SDTimeEvent t1 = arg0;
+        SDTimeEvent t2 = arg1;
+        if (t1.getEvent() > t2.getEvent()) {
             return 1;
-        else if (t1.getEvent() == t2.getEvent())
+        }
+        else if (t1.getEvent() == t2.getEvent()) {
             return 0;
-        else
-            return -1;
+        }
+        return -1;
     }
-
 }
This page took 0.025093 seconds and 5 git commands to generate.