Class RecursiveTreeNode

  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byorg.annotation.util.RecursiveTreeNode
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, javax.swing.tree.MutableTreeNode, Recursable,, javax.swing.tree.TreeNode

public class RecursiveTreeNode
extends javax.swing.tree.DefaultMutableTreeNode
implements Recursable

SortedTreeNode is a data structure to have a sorted tree structure. Nodes are inserted such that any node which is contained by another will be one of its children. Node which are less than or grater than one another will be siblings and sibling will be kept in asscending order from left to right.

See Also:
Serialized Form

Field Summary
protected  Recursable data
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Constructor Summary
RecursiveTreeNode(Recursable d)
Method Summary
 void add(javax.swing.tree.MutableTreeNode n)
 boolean addSort(RecursiveTreeNode node)
          Adds a SortedTreeNode to an existing tree inserting it in its proper location.
 int compareTo(java.lang.Object o)
 boolean contains(java.lang.Object o)
 RecursiveTreeNode getNode(Recursable d)
 java.util.List getPathTo(java.lang.Object o)
 boolean gt(java.lang.Object o)
 boolean hasPathTo(java.lang.Object o)
 int indexOf(java.lang.Object o)
 boolean intersects(java.lang.Object o)
 java.util.Iterator iterator()
 boolean lt(java.lang.Object o)
 int size()
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


protected Recursable data
Constructor Detail


public RecursiveTreeNode(Recursable d)
Method Detail


public RecursiveTreeNode getNode(Recursable d)


public boolean addSort(RecursiveTreeNode node)
Adds a SortedTreeNode to an existing tree inserting it in its proper location. The node in the tree where this node is placed is returned. This will be node unless a node in the tree with the same span already exist.


public void add(javax.swing.tree.MutableTreeNode n)


public java.util.Iterator iterator()
Specified by:
iterator in interface Recursable


public int size()
Specified by:
size in interface Recursable


public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface Recursable


public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


public boolean contains(java.lang.Object o)
Specified by:
contains in interface Recursable


public boolean hasPathTo(java.lang.Object o)
Specified by:
hasPathTo in interface Recursable


public java.util.List getPathTo(java.lang.Object o)
Specified by:
getPathTo in interface Recursable


public boolean intersects(java.lang.Object o)
Specified by:
intersects in interface Recursable


public boolean lt(java.lang.Object o)
Specified by:
lt in interface Recursable


public boolean gt(java.lang.Object o)
Specified by:
gt in interface Recursable

Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.