Package gnu.xquery.util
Class RelativeStepFilter
java.lang.Object
gnu.lists.FilterConsumer
gnu.xquery.util.RelativeStepFilter
- All Implemented Interfaces:
Consumer,PositionConsumer,XConsumer,Appendable,Consumer<Object>,DoubleConsumer,IntConsumer,LongConsumer
Used to filter the output of RelativeStep.
Atomic values are passed though as-is, while node values are sorted
by document order and duplicates removed. An exception is thrown
if there is a mix of atoms and nodes.
Informally:
E1/E2 is implemented as:
RelativeStepFilter(for $dot in E1 return E2).-
Field Summary
Fields inherited from class gnu.lists.FilterConsumer
attributeType, base, inAttribute, skipping -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidfinish()voidvoidwritePosition(AbstractSequence seq, int ipos) Consume a single position pair.voidwritePosition(SeqPosition position) Consume node at current position.Methods inherited from class gnu.lists.FilterConsumer
append, append, append, beforeNode, beginEntity, endAttribute, endDocument, endElement, endEntity, ignoring, startAttribute, startDocument, startElement, write, write, write, write, writeBoolean, writeCDATA, writeComment, writeDouble, writeFloat, writeInt, writeLong, writeProcessingInstructionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.DoubleConsumer
andThenMethods inherited from interface java.util.function.IntConsumer
andThenMethods inherited from interface java.util.function.LongConsumer
andThen
-
Constructor Details
-
RelativeStepFilter
-
-
Method Details
-
writePosition
Description copied from interface:PositionConsumerConsume node at current position. The caller may invalidate or change the position after consume returns, so if the consumer wants to save it, it needs to copy it.- Specified by:
writePositionin interfacePositionConsumer
-
writeObject
- Specified by:
writeObjectin interfaceConsumer- Overrides:
writeObjectin classFilterConsumer
-
beforeContent
protected void beforeContent()- Overrides:
beforeContentin classFilterConsumer
-
writePosition
Description copied from interface:PositionConsumerConsume a single position pair. This PositionConsumer may assume the sequence does no reference management; i.e. that copyPos is trivial and releasePos is a no-op. If that is not the case, use consume(TreePosition) instead.- Specified by:
writePositionin interfacePositionConsumer
-
finish
public void finish()
-