de.espirit.firstspirit.service.treedata
Interface TNode<I>


public interface TNode<I>

Hierarchical data object.

Since:
4.0.63

Method Summary
 boolean exists()
          Returns true if the node exists, false otherwise
 int getChildCount()
          Returns the number of children.
 Iterable<TNode<I>> getChildren()
          Returns children.
 I getId()
          Returns the object id.
 String getLabel(Locale locale)
          Returns language specific label.
 TNode<I> getParent()
          Returns parent object and null for root elements without parent.
 Iterable<TNode<I>> getPath()
          Returns path to root or null for root nodes.
 Object getProperty(String name)
          Returns a user defined property; null for unknown properties.
 Iterable<String> getPropertyNames()
          Returns all property names.
 boolean hasChildren()
          Returns true if this object has children.
 boolean isRoot()
          Returns true for root elements.
 boolean isSelectable()
          Returns true if this object can be selected.
 

Method Detail

getId

@NotNull
I getId()
Returns the object id.

Returns:
the object id.
Since:
4.0.63

getParent

@Nullable
TNode<I> getParent()
Returns parent object and null for root elements without parent.

Returns:
parent object and null for root elements.
Since:
4.0.63

getPath

Iterable<TNode<I>> getPath()
Returns path to root or null for root nodes. The path starts with the node's parent, ..., root node.

Returns:
path to root or null for root nodes.
Since:
4.0.63

isRoot

boolean isRoot()
Returns true for root elements.

Returns:
true for root elements.
Since:
4.0.63

getChildCount

int getChildCount()
Returns the number of children.

Returns:
the number of children.
Since:
4.0.63

getChildren

@NotNull
Iterable<TNode<I>> getChildren()
Returns children.

Returns:
children.
Since:
4.0.63

hasChildren

boolean hasChildren()
Returns true if this object has children.

Returns:
true if this entity has children.
Since:
4.0.63

getLabel

@NotNull
String getLabel(@Nullable
                        Locale locale)
Returns language specific label. If no label is definied for the given locale a default label must be returned.

Parameters:
locale - locale.
Returns:
language specific label.
Since:
4.0.63

getPropertyNames

@NotNull
Iterable<String> getPropertyNames()
Returns all property names.

Returns:
all property names.
Since:
4.0.63

getProperty

@Nullable
Object getProperty(@NotNull
                            String name)
Returns a user defined property; null for unknown properties.

Parameters:
name - property name.
Returns:
a user defined property; null for unknown properties.
Since:
4.0.63
See Also:
TNode.getPropertyNames()

isSelectable

boolean isSelectable()
Returns true if this object can be selected.

Returns:
true if this object can be selected.
Since:
4.0.63

exists

boolean exists()
Returns true if the node exists, false otherwise

Returns:
true if the node exists, false otherwise
Since:
4.0.63


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480