analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / widgets / timegraph / model / ITimeEvent.java
CommitLineData
be222f56 1/*******************************************************************************
ed902a2b 2 * Copyright (c) 2009, 2014 Ericsson
be222f56
PT
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 * Alvaro Sanchez-Leon - Initial API and implementation
11 * Patrick Tasse - Refactoring
12 *******************************************************************************/
13
2bdf0193 14package org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model;
be222f56
PT
15
16/**
17 * Interface for time events, for use in the timegraph view
18 *
19 * @version 1.0
20 * @author Alvaro Sanchez-Leon
21 * @author Patrick Tasse
22 */
23public interface ITimeEvent {
24
25 /**
26 * Get the entry matching this time event.
27 *
28 * @return The time graph entry
29 */
57a2a5ca 30 ITimeGraphEntry getEntry();
be222f56
PT
31
32 /**
33 * Get the timestamp of this event.
34 *
35 * @return The event's time
36 */
57a2a5ca 37 long getTime();
be222f56
PT
38
39 /**
40 * @return
41 * <list>
42 * <li>-1: Considers duration to be from current event till the next</li>
43 * <li>0: Duration is not relevant e.g. a Burst / no state associated</li>
44 * <li>>0: Valid duration value specified</li>
45 * </list>
46 * <p>
47 */
57a2a5ca 48 long getDuration();
be222f56 49
2e7d9caa
AM
50 /**
51 * Split an event in two at the specified time and keep the part before the
52 * split. If the time is smaller or equal to the event's start, the returned
53 * event is null.
54 *
55 * @param splitTime
56 * the time at which the event is to be split
57 * @return The part before the split time
58 */
59 ITimeEvent splitBefore(long splitTime);
60
61 /**
62 * Split an event in two at the specified time and keep the part after the
63 * split. If the time is greater or equal to the event's end, the returned
64 * event is null.
65 *
66 * @param splitTime
67 * the time at which the event is to be split
68 * @return The part after the split time
69 */
70 ITimeEvent splitAfter(long splitTime);
b0d3496e 71}
This page took 0.089002 seconds and 5 git commands to generate.