TUM CCSM Commons

edu.tum.cs.commons.tree
Class SimpleTreeNodeHandler<K>

java.lang.Object
  extended by edu.tum.cs.commons.tree.SimpleTreeNodeHandler<K>
All Implemented Interfaces:
ITreeNodeHandler<SimpleTreeNode<K>,K>

public class SimpleTreeNodeHandler<K>
extends java.lang.Object
implements ITreeNodeHandler<SimpleTreeNode<K>,K>

Handler for SimpleTreeNode.

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

Constructor Summary
SimpleTreeNodeHandler(K rootKey)
          Create new handler.
 
Method Summary
 SimpleTreeNode<K> createRoot()
          Create root of node of the tree.
 SimpleTreeNode<K> getOrCreateChild(SimpleTreeNode<K> node, K key)
          Get the nodes child identified by the provided key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTreeNodeHandler

public SimpleTreeNodeHandler(K rootKey)
Create new handler.

Parameters:
rootKey - the key used for the root node.
Method Detail

createRoot

public SimpleTreeNode<K> createRoot()
Create root of node of the tree.

Specified by:
createRoot in interface ITreeNodeHandler<SimpleTreeNode<K>,K>

getOrCreateChild

public SimpleTreeNode<K> getOrCreateChild(SimpleTreeNode<K> 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.

Specified by:
getOrCreateChild in interface ITreeNodeHandler<SimpleTreeNode<K>,K>

TUM CCSM Commons

TUM CCSM Commons - 2.7