org.kuali.maven.plugins.graph.tree
Class Node<T>

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.kuali.maven.plugins.graph.tree.Node<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class Node<T>
extends DefaultMutableTreeNode

General-purpose node for working with tree data structures. Every node in the tree contains a reference to the same type of object.

Author:
jeffcaddel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
Node()
           
Node(T userObject)
           
Node(T userObject, boolean allowsChildren)
           
 
Method Summary
 void add(MutableTreeNode newChild)
          Deprecated. Use add(TypedNode newChild) instead
 void add(Node<T> newChild)
           
 Enumeration<Node<T>> children()
           
 List<Node<T>> getBreadthFirstList()
           
 List<Node<T>> getChildren()
           
 List<Node<T>> getDepthFirstList()
           
protected
<E> List<E>
getList(Enumeration<E> e)
           
 T getObject()
           
 Node<T> getParent()
           
 Node<T>[] getPath()
           
 Node<T> getRoot()
           
 T getUserObject()
          Deprecated. Use getObject() instead
 void setObject(T object)
           
 void setUserObject(Object userObject)
          Deprecated. Use setObject(T) instead
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node()

Node

public Node(T userObject)

Node

public Node(T userObject,
            boolean allowsChildren)
Method Detail

getPath

public Node<T>[] getPath()
Overrides:
getPath in class DefaultMutableTreeNode

getRoot

public Node<T> getRoot()
Overrides:
getRoot in class DefaultMutableTreeNode

children

public Enumeration<Node<T>> children()
Specified by:
children in interface TreeNode
Overrides:
children in class DefaultMutableTreeNode

getBreadthFirstList

public List<Node<T>> getBreadthFirstList()

getDepthFirstList

public List<Node<T>> getDepthFirstList()

getList

protected <E> List<E> getList(Enumeration<E> e)

getChildren

public List<Node<T>> getChildren()

getObject

public T getObject()

setObject

public void setObject(T object)

getUserObject

@Deprecated
public T getUserObject()
Deprecated. Use getObject() instead

Overrides:
getUserObject in class DefaultMutableTreeNode

setUserObject

@Deprecated
public void setUserObject(Object userObject)
Deprecated. Use setObject(T) instead

Specified by:
setUserObject in interface MutableTreeNode
Overrides:
setUserObject in class DefaultMutableTreeNode

add

public void add(Node<T> newChild)

add

@Deprecated
public void add(MutableTreeNode newChild)
Deprecated. Use add(TypedNode newChild) instead

Overrides:
add in class DefaultMutableTreeNode

getParent

public Node<T> getParent()
Specified by:
getParent in interface TreeNode
Overrides:
getParent in class DefaultMutableTreeNode


Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.