net.sf.saxon.expr
Class CardinalityCheckingIterator
java.lang.Object
net.sf.saxon.expr.CardinalityCheckingIterator
- SequenceIterator
public final class CardinalityCheckingIterator
extends java.lang.Object
CardinalityCheckingIterator returns the items in an underlying sequence
unchanged, but checks that the number of items conforms to the required
cardinality. Because cardinality checks are required to take place even
if the consumer of the sequence does not require all the items, we read
the first two items at initialization time. This is sufficient to perform
the checks; after that we can simply return the items from the base sequence.
CardinalityCheckingIterator
public CardinalityCheckingIterator(SequenceIterator base,
int requiredCardinality,
RoleLocator role)
throws XPathException
Construct an CardinalityCheckingIterator that will return the same items as the base sequence,
checking how many there are
base
- the base iteratorrequiredCardinality
- the required Cardinality
getProperties
public int getProperties()
Get properties of this iterator, as a bit-significant integer.
- getProperties in interface SequenceIterator