java.lang.Object | +--FilterTreeNode
Class FilterTreeNode is used for each node in a FilterTree.
| Field Summary | |
int |
botY
The lowest Y value of the region corresponding to this node. |
int |
ID
Each instance is given a unique ID for debugging purposes. |
boolean |
isLeaf
Is this node a leaf? |
int |
leftX
The leftmost X value of the rectangular region corresponding to this node. |
int |
level
Which level is this node at? |
int |
midX
The X value of the vertical bisector of the region corresponding to this node. |
int |
midY
The Y value of the horizontal bisector of the region corresponding to this node. |
FilterTreeNode[] |
quadrants
The list of (possibly four) children. |
java.util.LinkedList |
rectList
The list of data rectangles stored at this node. Remember to cast when you access the list. |
int |
rightX
The rightmost X value of the rectangular region corresponding to this node. |
int |
topY
The largest Y value of the region corresponding to this node. |
| Constructor Summary | |
FilterTreeNode(int quadNum,
FilterTreeNode node)
An alternate constructor for internal use. |
|
FilterTreeNode(int leftX,
int rightX,
int botY,
int topY,
int level)
Creates a new FilterTreeNode instance, given
(1) the extreme X values of the rectangular region,
(2) the extreme Y values of the rectangular region,
and (3) the level of the tree where this node will reside.
The constructor computes the bisector values midX and
midY.
|
|
| Method Summary | |
java.lang.String |
toString()
Overrides Object's toString method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int ID
public int level
public boolean isLeaf
public int leftX
public int rightX
public int midX
public int botY
public int topY
public int midY
public FilterTreeNode[] quadrants
public java.util.LinkedList rectList
java.util.LinkedList and is initialized in the
constructor. Remember to cast when you
access the list, for example, to retrieve from the list. | Constructor Detail |
public FilterTreeNode(int leftX,
int rightX,
int botY,
int topY,
int level)
FilterTreeNode instance, given
(1) the extreme X values of the rectangular region,
(2) the extreme Y values of the rectangular region,
and (3) the level of the tree where this node will reside.
The constructor computes the horizontal (midY)
and vertical (midX) bisectors, creates
space for four child-pointers, and initializes the attached
linked list.leftX - an int valuerightX - an int valuebotY - an int valuetopY - an int valuelevel - an int value
public FilterTreeNode(int quadNum,
FilterTreeNode node)
quadNum - an int valuenode - a FilterTreeNode value| Method Detail |
public java.lang.String toString()
Object's toString method.toString in class java.lang.ObjectString value