Fix #1 for Bug287488
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / eventlog / TmfStreamBookmark.java
CommitLineData
4ab33d2b
AO
1/*******************************************************************************
2 * Copyright (c) 2009 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made 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
8 *
9 * Contributors:
10 * Francois Chouinard (fchouinard@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.eventlog;
14
15import org.eclipse.linuxtools.tmf.event.TmfTimestamp;
16
17/**
18 * <b><u>TmfStreamBookmark</u></b>
19 * <p>
20 * This class maps an event timestamp with a trace location.
21 */
22public class TmfStreamBookmark implements Comparable<TmfStreamBookmark> {
23
24 // ========================================================================
25 // Attributes
26 // ========================================================================
27
28 private final TmfTimestamp fTimestamp;
29 private final Object fLocation;
30
31 // ========================================================================
32 // Constructors
33 // ========================================================================
34
35 /**
36 * @param ts
37 * @param location
38 */
39 public TmfStreamBookmark(TmfTimestamp ts, Object location) {
40 fTimestamp = ts;
41 fLocation = location;
42 }
43
44 // ========================================================================
45 // Accessors
46 // ========================================================================
47
48 /**
49 * @return the bookmarked event timestamp
50 */
51 public TmfTimestamp getTimestamp() {
52 return fTimestamp;
53 }
54
55 /**
56 * @return the bookmarked event stream location
57 */
58 public Object getLocation() {
59 return fLocation;
60 }
61
62 // ========================================================================
63 // Operators
64 // ========================================================================
65
4ab33d2b
AO
66 public int compareTo(TmfStreamBookmark other) {
67 return fTimestamp.compareTo(other.fTimestamp, false);
68 }
69
70}
This page took 0.028169 seconds and 5 git commands to generate.