TUM CCSM Commons

edu.tum.cs.commons.tree
Interface ITreeNodeHandler<T,K>

Type Parameters:
T - the type of nodes this handler handles
K - the key used by the nodes to identify children
All Known Implementing Classes:
SimpleTreeNodeHandler

public interface ITreeNodeHandler<T,K>

This interface is used by TreeUtils to create tree structures. We use this factory-based approach as this allows us to create trees based on model elements that do not have to implement any specific interfaces.

Version:
$Rev: 26268 $
Author:
deissenb, $Author: juergens $
Rating:
GREEN Hash: 18A7ECBF6AD2E499BD9957FB39C6557D

Method Summary
 T createRoot()
          Create root of node of the tree.
 T getOrCreateChild(T node, K key)
          Get the nodes child identified by the provided key.
 

Method Detail

getOrCreateChild

T getOrCreateChild(T node,
                   K key)
Get the nodes child identified by the provided key. If the node has no child with the specified key, one should be created.


createRoot

T createRoot()
Create root of node of the tree.


TUM CCSM Commons

TUM CCSM Commons - 2.7