Class HandlerStack

java.lang.Object
uk.ac.starlink.ttools.votlint.HandlerStack

public class HandlerStack extends Object
Data structure which keeps track of the elements currently in scope during the SAX parse.
Since:
7 Apr 2005
Author:
Mark Taylor (Starlink)
  • Constructor Details

    • HandlerStack

      public HandlerStack()
  • Method Details

    • pop

      public ElementHandler pop()
      Pops a handler off the top of the stack.
      Returns:
      the element which has just been removed
    • push

      public void push(ElementHandler handler)
      Pushes a new handler onto the stack.
      Parameters:
      handler - handler to push
    • top

      public ElementHandler top()
      Returns the handler at the top of the list without removing it.
      Returns:
      top element
    • getAncestry

      public Ancestry getAncestry()
      Returns an ancestry object for the handler at the top of this stack. This is only valid for as long as that object is still in the stack. An attempt to use it after that point will give garbage results or may result in an unchecked throwable.
      Returns:
      ancestry for the top element