com.icl.saxon.expr

Class IntersectionEnumeration

Implemented Interfaces:
NodeEnumeration

public class IntersectionEnumeration
extends java.lang.Object
implements NodeEnumeration

An enumeration representing a nodeset that is an intersection of two other NodeSets. There is currently no operator in XPath to create such an expression, but it is used by the extension function intersection(). The code is derived from the analagous UnionEnumeration, an inner class of UnionExpression.

Constructor Summary

IntersectionEnumeration(NodeEnumeration p1, NodeEnumeration p2, Controller controller)
Form an enumeration of the intersection of the nodes in two nodesets

Method Summary

boolean
hasMoreElements()
boolean
isPeer()
boolean
isReverseSorted()
boolean
isSorted()
NodeInfo
nextElement()

Constructor Details

IntersectionEnumeration

public IntersectionEnumeration(NodeEnumeration p1,
                               NodeEnumeration p2,
                               Controller controller)
            throws XPathException
Form an enumeration of the intersection of the nodes in two nodesets
Parameters:
p1 - the first operand
p2 - the second operand
controller - Comparer to be used for putting nodes in document order

Method Details

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface NodeEnumeration

isPeer

public boolean isPeer()
Specified by:
isPeer in interface NodeEnumeration

isReverseSorted

public boolean isReverseSorted()
Specified by:
isReverseSorted in interface NodeEnumeration

isSorted

public boolean isSorted()
Specified by:
isSorted in interface NodeEnumeration

nextElement

public NodeInfo nextElement()
            throws XPathException
Specified by:
nextElement in interface NodeEnumeration