cf94fbd82368728b285a4488786627809934accc
1 /*******************************************************************************
2 * Copyright (c) 2009, 2014 Ericsson
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
10 * Alvaro Sanchez-Leon - Initial API and implementation
11 * Patrick Tasse - Refactoring
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.model
;
16 import java
.util
.Iterator
;
17 import java
.util
.List
;
19 import org
.eclipse
.jdt
.annotation
.NonNull
;
22 * Interface for an entry (row) in the time graph view
24 * @author Alvaro Sanchez-Leon
25 * @author Patrick Tasse
27 public interface ITimeGraphEntry
{
30 * Returns the parent of this entry, or <code>null</code> if it has none.
32 * @return the parent element, or <code>null</code> if it has none
34 ITimeGraphEntry
getParent();
37 * Returns whether this entry has children.
39 * @return <code>true</code> if the given element has children,
40 * and <code>false</code> if it has no children
42 boolean hasChildren();
45 * Returns the child elements of this entry.
47 * @return an array of child elements
49 List
<@NonNull ?
extends ITimeGraphEntry
> getChildren();
52 * Returns the name of this entry.
54 * @return the entry name
59 * Returns the start time of this entry in nanoseconds.
61 * @return the start time
66 * Returns the end time of this entry in nanoseconds.
68 * @return the end time
73 * Returns whether this entry has time events.
74 * If true, the time events iterator should not be null.
76 * @return true if the entry has time events
78 * @see #getTimeEventsIterator
79 * @see #getTimeEventsIterator(long, long, long)
81 boolean hasTimeEvents();
84 * Get an iterator which returns all time events.
86 * @return the iterator
88 Iterator
<@NonNull ?
extends ITimeEvent
> getTimeEventsIterator();
91 * Get an iterator which only returns events that fall within the start time
92 * and the stop time. The visible duration is the event duration below which
93 * further detail is not discernible. If no such iterator is implemented,
94 * provide a basic iterator which returns all events.
97 * start time in nanoseconds
99 * stop time in nanoseconds
100 * @param visibleDuration
101 * duration of one pixel in nanoseconds
103 * @return the iterator
105 <T
extends ITimeEvent
> Iterator
<@NonNull T
> getTimeEventsIterator(long startTime
, long stopTime
, long visibleDuration
);
This page took 0.055706 seconds and 4 git commands to generate.