net.esper.collection
Class SingleEventIterator

java.lang.Object
  extended by net.esper.collection.SingleEventIterator
All Implemented Interfaces:
Iterator<EventBean>

public class SingleEventIterator
extends Object
implements Iterator<EventBean>

A utility class for an iterator that has one element.


Constructor Summary
SingleEventIterator(EventBean eventBean)
          Constructor, takes the single event to iterate over as a parameter.
 
Method Summary
 boolean hasNext()
           
 EventBean next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleEventIterator

public SingleEventIterator(EventBean eventBean)
Constructor, takes the single event to iterate over as a parameter. The single event can be null indicating that there are no more elements.

Parameters:
eventBean - single bean that the iterator returns, or null for an empty iterator
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<EventBean>

next

public EventBean next()
Specified by:
next in interface Iterator<EventBean>

remove

public void remove()
Specified by:
remove in interface Iterator<EventBean>