Class AbstractTreeNodeFactory
- java.lang.Object
-
- org.forgerock.openam.entitlement.utils.indextree.nodefactory.AbstractTreeNodeFactory
-
- All Implemented Interfaces:
TreeNodeFactory
- Direct Known Subclasses:
BasicTreeNodeFactory
public abstract class AbstractTreeNodeFactory extends Object implements TreeNodeFactory
Provides the boilerplate logic for a basic tree node factory.- Author:
- apforrest
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeNodeFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddNodeCreator(char nodeValue, NodeCreator creator)Add a node creator for the given node value.protected abstract TreeNodecreateDefaultNode(char nodeValue)Creates a default tree node where no corresponding node creator has been identified.TreeNodegetTreeNode(char nodeValue)Given the node value create a new tree node.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.openam.entitlement.utils.indextree.nodefactory.TreeNodeFactory
getRootNode
-
-
-
-
Method Detail
-
getTreeNode
public TreeNode getTreeNode(char nodeValue)
Description copied from interface:TreeNodeFactoryGiven the node value create a new tree node.- Specified by:
getTreeNodein interfaceTreeNodeFactory- Parameters:
nodeValue- The node value.- Returns:
- A new tree node.
-
addNodeCreator
protected void addNodeCreator(char nodeValue, NodeCreator creator)Add a node creator for the given node value.- Parameters:
nodeValue- The node value.creator- The node creator instance.
-
createDefaultNode
protected abstract TreeNode createDefaultNode(char nodeValue)
Creates a default tree node where no corresponding node creator has been identified.- Parameters:
nodeValue- The node value.- Returns:
- A default tree node.
-
-