Package uk.ac.starlink.ttools.votlint
Class HandlerStack
java.lang.Object
uk.ac.starlink.ttools.votlint.HandlerStack
Data structure which keeps track of the elements currently in scope
during the SAX parse.
- Since:
- 7 Apr 2005
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an ancestry object for the handler at the top of this stack.pop()
Pops a handler off the top of the stack.void
push
(ElementHandler handler) Pushes a new handler onto the stack.top()
Returns the handler at the top of the list without removing it.
-
Constructor Details
-
HandlerStack
public HandlerStack()
-
-
Method Details
-
pop
Pops a handler off the top of the stack.- Returns:
- the element which has just been removed
-
push
Pushes a new handler onto the stack.- Parameters:
handler
- handler to push
-
top
Returns the handler at the top of the list without removing it.- Returns:
- top element
-
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
-