net.sf.saxon.evpull
Class EventIteratorOverSequence

java.lang.Object
  extended by net.sf.saxon.evpull.EventIteratorOverSequence
All Implemented Interfaces:
EventIterator, PullEvent

public class EventIteratorOverSequence
extends Object
implements EventIterator

This class maps a SequenceIterator to an EventIterator, by simply returning the items in the sequence as PullEvents.


Constructor Summary
EventIteratorOverSequence(SequenceIterator base)
          Create an EventIterator that wraps a given SequenceIterator
 
Method Summary
 boolean isFlatSequence()
          Determine whether the EventIterator returns a flat sequence of events, or whether it can return nested event iterators
 PullEvent next()
          Get the next PullEvent in the sequence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventIteratorOverSequence

public EventIteratorOverSequence(SequenceIterator base)
Create an EventIterator that wraps a given SequenceIterator

Parameters:
base - the SequenceIterator to be wrapped
Method Detail

next

public PullEvent next()
               throws XPathException
Get the next PullEvent in the sequence

Specified by:
next in interface EventIterator
Returns:
the next PullEvent
Throws:
XPathException - in case of a dynamic error

isFlatSequence

public boolean isFlatSequence()
Determine whether the EventIterator returns a flat sequence of events, or whether it can return nested event iterators

Specified by:
isFlatSequence in interface EventIterator
Returns:
true if the next() method is guaranteed never to return an EventIterator


Copyright (C) Michael H. Kay. All rights reserved.