Commit | Line | Data |
---|---|---|
c0188b25 GB |
1 | /******************************************************************************* |
2 | * Copyright (c) 2014 École Polytechnique de Montréal | |
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 | * Geneviève Bastien - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.viewers.tree; | |
14 | ||
15 | import java.util.List; | |
16 | ||
59c8ff34 MAL |
17 | import org.eclipse.jdt.annotation.NonNull; |
18 | ||
c0188b25 GB |
19 | /** |
20 | * Interface for an entry (row) in a TMF tree viewer | |
21 | * | |
22 | * @author Geneviève Bastien | |
23 | * @since 3.0 | |
24 | */ | |
25 | public interface ITmfTreeViewerEntry { | |
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 | */ | |
32 | ITmfTreeViewerEntry getParent(); | |
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 | */ | |
40 | boolean hasChildren(); | |
41 | ||
42 | /** | |
43 | * Returns the child elements of this entry. | |
44 | * | |
45 | * @return an array of child elements | |
46 | */ | |
59c8ff34 | 47 | @NonNull |
c0188b25 GB |
48 | List<? extends ITmfTreeViewerEntry> getChildren(); |
49 | ||
50 | /** | |
51 | * Returns the name of this entry. | |
52 | * | |
53 | * @return the entry name | |
54 | */ | |
55 | String getName(); | |
56 | ||
57 | } |