1 /**********************************************************************
2 * Copyright (c) 2005, 2006 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
11 * IBM - Initial API and implementation
12 * Bernd Hufmann - Updated for TMF
13 **********************************************************************/
14 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.util
;
16 import java
.io
.Serializable
;
17 import java
.util
.Comparator
;
19 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.core
.SDTimeEvent
;
22 * Time event comparator
27 public class TimeEventComparator
implements Comparator
<SDTimeEvent
>, Serializable
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
36 private static final long serialVersionUID
= 5885497718872575669L;
38 // ------------------------------------------------------------------------
40 // ------------------------------------------------------------------------
44 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
47 public int compare(SDTimeEvent arg0
, SDTimeEvent arg1
) {
48 SDTimeEvent t1
= (SDTimeEvent
) arg0
;
49 SDTimeEvent t2
= (SDTimeEvent
) arg1
;
50 if (t1
.getEvent() > t2
.getEvent()) {
53 else if (t1
.getEvent() == t2
.getEvent()) {
This page took 0.035818 seconds and 6 git commands to generate.