Commit | Line | Data |
---|---|---|
e8251298 PT |
1 | /******************************************************************************* |
2 | * Copyright (c) 2013 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 | * Patrick Tasse - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.views.callstack; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent; | |
16 | ||
17 | /** | |
18 | * Time Event implementation specific to the Call Stack View | |
19 | * | |
20 | * @author Patrick Tasse | |
21 | * @since 2.0 | |
22 | */ | |
23 | public class CallStackEvent extends TimeEvent { | |
24 | ||
25 | private int fValue = -1; | |
26 | ||
27 | /** | |
28 | * Standard constructor | |
29 | * | |
30 | * @param entry | |
31 | * The entry that this event affects | |
32 | * @param time | |
33 | * The start time of the event | |
34 | * @param duration | |
35 | * The duration of the event | |
36 | * @param value | |
37 | * The event value (1-256) | |
38 | */ | |
39 | public CallStackEvent(CallStackEntry entry, long time, long duration, int value) { | |
40 | super(entry, time, duration); | |
41 | fValue = value; | |
42 | } | |
43 | ||
44 | /** | |
45 | * Retrieve the value associated with this event | |
46 | * | |
47 | * @return The integer value | |
48 | */ | |
4999a196 | 49 | @Override |
e8251298 PT |
50 | public int getValue() { |
51 | return fValue; | |
52 | } | |
53 | ||
54 | @Override | |
55 | public String toString() { | |
bec1f1ac | 56 | return getClass().getSimpleName() + " start=" + getTime() + " end=" + (getTime() + getDuration()) + " duration=" + getDuration() + " value=" + fValue; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
e8251298 PT |
57 | } |
58 | } |