org.cyberneko.pull.util
Class EventQueue

java.lang.Object
  extended byorg.cyberneko.pull.util.EventQueue
Direct Known Subclasses:
EventCollector

public class EventQueue
extends java.lang.Object

A general purpose queue for pull parser event objects.

Version:
$Id: EventQueue.java,v 1.2 2003/01/28 20:00:30 andyc Exp $
Author:
Andy Clark

Field Summary
protected  XMLEvent fHead
          The head of the queue.
protected  int fSize
          The size of the queue.
protected  XMLEvent fTail
          The tail of the queue.
 
Constructor Summary
EventQueue()
           
 
Method Summary
 void clear()
          Clears the queue.
 XMLEvent dequeue()
          Removes and returns an event from the queue, or null if the queue is empty.
 void enqueue(XMLEvent event)
          Adds an event to the queue.
 boolean isEmpty()
          Returns true if the queue is empty.
 int size()
          Returns the size of the queue.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fSize

protected int fSize
The size of the queue.


fHead

protected XMLEvent fHead
The head of the queue.


fTail

protected XMLEvent fTail
The tail of the queue.

Constructor Detail

EventQueue

public EventQueue()
Method Detail

size

public int size()
Returns the size of the queue.


clear

public void clear()
Clears the queue.


isEmpty

public boolean isEmpty()
Returns true if the queue is empty.


enqueue

public void enqueue(XMLEvent event)
Adds an event to the queue.


dequeue

public XMLEvent dequeue()
Removes and returns an event from the queue, or null if the queue is empty.


toString

public java.lang.String toString()
Returns a String representation of this object.



(C) Copyright 2002-2004, Andy Clark. All rights reserved.