1 /*******************************************************************************
2 * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 * Contributors: Simon Marchi - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.ctf
.core
.trace
;
15 import java
.io
.Serializable
;
16 import java
.util
.Comparator
;
18 import org
.eclipse
.linuxtools
.ctf
.core
.trace
.StreamInputReader
;
22 * <b><u>StreamInputReaderComparator</u></b>
24 * TODO Implement me. Please.
26 public class StreamInputReaderComparator
implements
27 Comparator
<StreamInputReader
>, Serializable
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
33 private static final long serialVersionUID
= 7477206132343139753L;
35 // ------------------------------------------------------------------------
37 // ------------------------------------------------------------------------
40 public int compare(StreamInputReader a
, StreamInputReader b
) {
41 // TODO: use unsigned comparison to avoid sign errors if needed
42 long ta
= a
.getCurrentEvent().getTimestamp();
43 long tb
= b
.getCurrentEvent().getTimestamp();