1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.core
.model
;
14 import org
.eclipse
.core
.runtime
.IAdaptable
;
20 public interface ILTTngTreeNode
<E
extends ILTTngTreeNode
<E
>> extends IAdaptable
{
21 // ========================================================================
23 // ========================================================================
25 * Return the unique id of this resource
32 * Types are defined by the user application
36 public Object
getType();
39 * Return this resource name
43 public E
getChildByName(String name
);
47 * k needed for the creation of the generic array
50 public E
[] getChildren();
53 * Get the child by its unique id
58 public E
getChildById(Long id
);
61 * Get the parent of this resource
70 public boolean hasChildren();
73 * Return the name of this resource
77 public String
getName();
81 * Get the path from parent resources to this resource
84 * e.g. /root/name1/name2
89 public String
getPath();
92 * Return the reference value associated to this tree node
96 public Object
getValue();
99 * returns the next value to be used as unique id in reference to this
100 * instance e.g. can be used to construct children unique ids.
102 public Long
getNextUniqueId();
105 * Returns an attribute by name and casts the attribute value to the
106 * specified type, returns null if the attribute itself is null, not and
107 * instance of the specified class or the attribute has not been added
111 public <T
> T
getAttribute(String name
, Class
<T
> type
);
114 * Adds an attribute by name and which is not a tree node element
116 * @return true if the element was not added e.g. invalid input
118 public boolean addAttribute(String name
, Object attribute
);
This page took 0.036959 seconds and 5 git commands to generate.