public static class SequenceExchanger.Consumer extends Object implements SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
Constructor and Description |
---|
SequenceExchanger.Consumer(Conduit conduit,
SequenceExchanger.Producer producer)
Create a consumer
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the iterator.
|
Item |
current()
Get the current value in the sequence (the one returned by the
most recent call on next()).
|
SequenceIterator |
getAnother()
Get another SequenceIterator that iterates over the same items as the original,
but which is repositioned at the start of the sequence.
|
int |
getProperties()
Get properties of this iterator, as a bit-significant integer.
|
Item |
next()
Get the next item in the sequence.
|
int |
position()
Get the current position.
|
public SequenceExchanger.Consumer(Conduit conduit, SequenceExchanger.Producer producer)
conduit
- The conduit from which items are to be readproducer
- The producer supplying items to the conduit. This is needed in case the sequence
needs to be re-read, which can happen when calling last().public Item current()
current
in interface SequenceIterator
public SequenceIterator getAnother() throws XPathException
getAnother
in interface SequenceIterator
XPathException
- if any error occurspublic int getProperties()
getProperties
in interface SequenceIterator
SequenceIterator.GROUNDED
and SequenceIterator.LAST_POSITION_FINDER
. It is always
acceptable to return the value zero, indicating that there are no known special properties.public Item next() throws XPathException
next
in interface SequenceIterator
XPathException
- if an error occurs retrieving the next itempublic int position()
position
in interface SequenceIterator
public void close()
close
in interface SequenceIterator
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.