Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009, 2010 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 - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.experiment; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.event.TmfTimestamp; | |
e31e01e8 | 16 | import org.eclipse.linuxtools.tmf.trace.TmfTraceContext; |
8c8bf09f ASL |
17 | |
18 | /** | |
19 | * <b><u>TmfExperimentCheckpoint</u></b> | |
20 | * <p> | |
21 | * TODO: Implement me. Please. | |
22 | */ | |
23 | public class TmfExperimentCheckpoint implements Comparable<TmfExperimentCheckpoint> { | |
24 | ||
25 | // ------------------------------------------------------------------------ | |
26 | // Attributes | |
27 | // ------------------------------------------------------------------------ | |
28 | ||
29 | private final TmfTimestamp fTimestamp; | |
e31e01e8 | 30 | private final TmfTraceContext[] fContexts; |
8c8bf09f ASL |
31 | |
32 | // ------------------------------------------------------------------------ | |
33 | // Constructors | |
34 | // ------------------------------------------------------------------------ | |
35 | ||
36 | /** | |
37 | * @param ts | |
38 | * @param location | |
39 | */ | |
e31e01e8 | 40 | public TmfExperimentCheckpoint(TmfTimestamp ts, TmfTraceContext[] contexts) { |
8c8bf09f ASL |
41 | fTimestamp = ts; |
42 | fContexts = contexts; | |
43 | } | |
44 | ||
45 | // ------------------------------------------------------------------------ | |
46 | // Accessors | |
47 | // ------------------------------------------------------------------------ | |
48 | ||
49 | /** | |
50 | * @return the checkpoint event timestamp | |
51 | */ | |
52 | public TmfTimestamp getTimestamp() { | |
53 | return fTimestamp; | |
54 | } | |
55 | ||
56 | /** | |
57 | * @return the checkpoint event stream location | |
58 | */ | |
e31e01e8 | 59 | public TmfTraceContext[] getContexts() { |
8c8bf09f ASL |
60 | return fContexts; |
61 | } | |
62 | ||
8c8bf09f ASL |
63 | // ------------------------------------------------------------------------ |
64 | // Comparable | |
65 | // ------------------------------------------------------------------------ | |
66 | ||
67 | public int compareTo(TmfExperimentCheckpoint other) { | |
68 | return fTimestamp.compareTo(other.fTimestamp, false); | |
69 | } | |
70 | ||
71 | } |