iterator
Class pnodeSplayPQ

java.lang.Object
  extended byiterator.pnodePQ
      extended byiterator.pnodeSplayPQ

public class pnodeSplayPQ
extends pnodePQ

Implements a sorted binary tree (extends class pnodePQ). Implements the enq and the deq functions.


Constructor Summary
pnodeSplayPQ()
          class constructor, sets default values.
pnodeSplayPQ(int fldNo, AttrType fldType, TupleOrder order)
          class constructor.
 
Method Summary
 pnode deq()
          Removes the minimum (Ascending) or maximum (Descending) element.
 void enq(pnode item)
          Inserts an element into the binary tree.
 
Methods inherited from class iterator.pnodePQ
empty, length, pnodeCMP, pnodeEQ
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

pnodeSplayPQ

public pnodeSplayPQ()
class constructor, sets default values.


pnodeSplayPQ

public pnodeSplayPQ(int fldNo,
                    AttrType fldType,
                    TupleOrder order)
class constructor.

Parameters:
fldNo - the field number for sorting
fldType - the type of the field for sorting
order - the order of sorting (Ascending or Descending)
Method Detail

enq

public void enq(pnode item)
         throws java.io.IOException,
                UnknowAttrType,
                TupleUtilsException
Inserts an element into the binary tree.

Specified by:
enq in class pnodePQ
Parameters:
item - the element to be inserted
Throws:
java.io.IOException - from lower layers
UnknowAttrType - attrSymbol or attrNull encountered
TupleUtilsException - error in tuple compare routines

deq

public pnode deq()
Removes the minimum (Ascending) or maximum (Descending) element.

Specified by:
deq in class pnodePQ
Returns:
the element removed