Remove all existing @since annotations
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / widgets / timegraph / model / ITimeGraphEntry.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
16import java.util.Iterator;
30652cc3 17import java.util.List;
be222f56
PT
18
19/**
20 * Interface for an entry (row) in the time graph view
21 *
be222f56
PT
22 * @author Alvaro Sanchez-Leon
23 * @author Patrick Tasse
24 */
25public interface ITimeGraphEntry {
26
27 /**
28 * Returns the parent of this entry, or <code>null</code> if it has none.
29 *
30 * @return the parent element, or <code>null</code> if it has none
31 */
57a2a5ca 32 ITimeGraphEntry getParent();
be222f56
PT
33
34 /**
35 * Returns whether this entry has children.
36 *
37 * @return <code>true</code> if the given element has children,
38 * and <code>false</code> if it has no children
39 */
57a2a5ca 40 boolean hasChildren();
be222f56
PT
41
42 /**
43 * Returns the child elements of this entry.
44 *
45 * @return an array of child elements
46 */
57a2a5ca 47 List<? extends ITimeGraphEntry> getChildren();
be222f56
PT
48
49 /**
50 * Returns the name of this entry.
51 *
52 * @return the entry name
53 */
57a2a5ca 54 String getName();
be222f56
PT
55
56 /**
57 * Returns the start time of this entry in nanoseconds.
58 *
59 * @return the start time
60 */
57a2a5ca 61 long getStartTime();
be222f56
PT
62
63 /**
64 * Returns the end time of this entry in nanoseconds.
65 *
66 * @return the end time
67 */
57a2a5ca 68 long getEndTime();
be222f56
PT
69
70 /**
71 * Returns whether this entry has time events.
72 * If true, the time events iterator should not be null.
73 *
74 * @return true if the entry has time events
75 *
76 * @see #getTimeEventsIterator
77 * @see #getTimeEventsIterator(long, long, long)
78 */
57a2a5ca 79 boolean hasTimeEvents();
be222f56
PT
80
81 /**
82 * Get an iterator which returns all time events.
83 *
84 * @return the iterator
85 */
57a2a5ca 86 <T extends ITimeEvent> Iterator<T> getTimeEventsIterator();
be222f56
PT
87
88 /**
89 * Get an iterator which only returns events that fall within the start time and the stop time.
90 * The visible duration is the event duration below which further detail is not discernible.
91 * If no such iterator is implemented, provide a basic iterator which returns all events.
92 *
93 * @param startTime start time in nanoseconds
94 * @param stopTime stop time in nanoseconds
95 * @param visibleDuration duration of one pixel in nanoseconds
96 *
97 * @return the iterator
98 */
57a2a5ca 99 <T extends ITimeEvent> Iterator<T> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration);
be222f56 100}
This page took 0.062746 seconds and 5 git commands to generate.