org.marc4j
Class RecordStack

java.lang.Object
  extended by org.marc4j.RecordStack

public class RecordStack
extends Object

Provides push and pop operations for Record objects created by MarcXmlParser.

Version:
$Revision: 1.2 $
Author:
Bas Peters

Constructor Summary
RecordStack()
          Default constuctor.
 
Method Summary
 void end()
          Called when the end of the document is reached.
 boolean hasNext()
          Returns true if there are more Record objects to expect, false otherwise.
 void passException(RuntimeException e)
          Passes the exception to the thread where the MarcXMLReader is running, so that the next() call that is blocked waiting for this thread, will receive the exception.
 Record pop()
          Removes the Record object from the stack and returns that object.
 void push(Record record)
          Pushes a Record object on the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordStack

public RecordStack()
Default constuctor.

Method Detail

push

public void push(Record record)
Pushes a Record object on the stack.

Parameters:
record - the record object

pop

public Record pop()
Removes the Record object from the stack and returns that object.

Returns:
Record - the record object

hasNext

public boolean hasNext()
Returns true if there are more Record objects to expect, false otherwise.

Returns:
boolean

passException

public void passException(RuntimeException e)
Passes the exception to the thread where the MarcXMLReader is running, so that the next() call that is blocked waiting for this thread, will receive the exception.


end

public void end()
Called when the end of the document is reached.



Copyright © 2002-2006 Bas Peters. All Rights Reserved.