pqrtree
Class Leaf

java.lang.Object
  extended by pqrtree.Node
      extended by pqrtree.Leaf

public class Leaf
extends Node

A Leaf object is one-to one correponding with the elements of the universe set. It can store any Object as data.

Version:
0.1
Author:
Bruno Dilly
See Also:
Node

Field Summary
private  java.lang.Object data
           
 
Fields inherited from class pqrtree.Node
ancestor, ancestorListPosition, ancestorReference, COLOR_BLACK, COLOR_GRAY, COLOR_WHITE, DRAW_BLACK_COLOR, DRAW_BOUNDARY_SIZE, DRAW_CONNECTOR_SIZE, DRAW_GRAY_COLOR, DRAW_NORMAL_COLOR, DRAW_SIZE, DRAW_WHITE_COLOR, leaf, TYPE_PNODE, TYPE_QNODE, TYPE_RNODE
 
Constructor Summary
Leaf(java.lang.Object data, PQRNode ancestor)
          Creates a new leaf of the PQRTree, that stores an object, and it is linked to it's ancestor.
 
Method Summary
 java.lang.Object getData()
          Gets data stored in the leaf when it was instaciated.
 
Methods inherited from class pqrtree.Node
countSubLeaves, drawNode, findLeader, getAncestor, getAncestorListPosition, getAncestorReference, getColor, getDepth, getParent, isLeaf, setAncestor, setAncestorListPosition, setAncestorReference, setColor, setParent, union, visited, wasVisited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private java.lang.Object data
Constructor Detail

Leaf

public Leaf(java.lang.Object data,
            PQRNode ancestor)
Creates a new leaf of the PQRTree, that stores an object, and it is linked to it's ancestor.

Parameters:
data -
ancestor - The internal node from which the new node descend.
See Also:
Node.Node(PQRNode)
Method Detail

getData

public java.lang.Object getData()
Gets data stored in the leaf when it was instaciated.

Returns:
Data stored.