Classes | Public Member Functions

org.exolab.castor.util.Stack Class Reference

List of all members.

Classes

class  StackItem
class  StackIterator

Public Member Functions

 Stack ()
boolean empty ()
Iterator iterator ()
Object peek () throws java.util.EmptyStackException
Object pop () throws java.util.EmptyStackException
void push (Object object)
int search (Object object)
int size ()

Detailed Description

A representation of a Stack that does not use Synchronization. For compatibility this class supports the same methods as a java.util.Stack (JDK)

Author:
Keith Visco
Version:
Revision:
1.2
Date:
2003/09/27 08:40:17

Constructor & Destructor Documentation

org.exolab.castor.util.Stack.Stack (  ) 

Creates an empty Stack


Member Function Documentation

boolean org.exolab.castor.util.Stack.empty (  ) 
Iterator org.exolab.castor.util.Stack.iterator (  ) 

Returns an Iterator for this Stack. The iterator will iterate from the top of the stack, to the bottom

Object org.exolab.castor.util.Stack.peek (  )  throws java.util.EmptyStackException

Returns the Object that is currently on top of the Stack. Unlike pop the Object is not removed from the Stack.

Returns:
the Object that is currently the top of the stack
Exceptions:
java.util.EmptyStackException when there are no elements currently on the Stack

References org.exolab.castor.util.Stack.empty().

Referenced by org.exolab.castor.xml.UnmarshalHandler.characters(), org.exolab.castor.xml.util.SAX2DOMHandler.characters(), org.exolab.castor.xml.UnmarshalHandler.endElement(), org.exolab.castor.xml.util.SAX2ANY.endElement(), org.exolab.castor.xml.UnmarshalHandler.getCurrentObject(), org.exolab.castor.xml.UnmarshalHandler.ignorableWhitespace(), and org.exolab.castor.xml.util.SAX2DOMHandler.startElement().

Object org.exolab.castor.util.Stack.pop (  )  throws java.util.EmptyStackException

Removes and returns the Object that is currently on top of the Stack.

Returns:
the Object that is currently the top of the stack
Exceptions:
java.util.EmptyStackException when there are no elements currently on the Stack

References org.exolab.castor.util.Stack.empty().

Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement(), org.exolab.castor.xml.util.SAX2DOMHandler.endElement(), org.exolab.castor.xml.util.SAX2ANY.endElement(), and org.exolab.castor.xml.util.SAX2ANY.startElement().

void org.exolab.castor.util.Stack.push ( Object  object  ) 
int org.exolab.castor.util.Stack.search ( Object  object  ) 

Searches for the given Object in the stack and returns it's position relative to the top of the Stack (ie the number of calls to pop() before the object is returned by pop())

int org.exolab.castor.util.Stack.size (  ) 

Returns the number of items on the Stack

Returns:
the number of items on the Stack

Referenced by org.exolab.castor.util.Stack.empty().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties