|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.stream.SequenceExchanger.Consumer
public static class SequenceExchanger.Consumer
The Consumer is a SequenceIterator that reads a sequence of items from the Conduit: that is, it allows its caller to make a sequence of calls on next(), each of which will return the next item pushed onto the Conduit by the corresponding Producer.
Field Summary |
---|
Fields inherited from interface net.sf.saxon.om.SequenceIterator |
---|
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD |
Constructor Summary | |
---|---|
SequenceExchanger.Consumer(Conduit conduit,
SequenceExchanger.Producer producer)
Create a consumer |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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().Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |