## net.sf.saxon.value
Class SequenceIntent

    java.lang.Object
      |
      +--net.sf.saxon.value.Value
            |
            +--net.sf.saxon.value.SequenceValue
                  |
                  +--net.sf.saxon.value.SequenceIntent

All Implemented Interfaces:
  Expression, java.io.Serializable

public class SequenceIntent
extends SequenceValue

A SequenceIntent is sequence value that uses deferred evaluation. It can be used as a value, but it is actually a wrapper around an iterator and a context, so the items in the sequence are not evaluated until they are required.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Constructor Summary
`SequenceIntent(SequenceIterator iterator)` Construct a SequenceIntent by supplying an iterator.

Method Summary
`ItemType` `getItemType()` Get the item type
`Item` `itemAt(int n)` Get the n'th item in the sequence (starting from 0).
`SequenceIterator` `iterate(XPathContext context)` Evaluate the expression in a given context to return a sequence

Methods inherited from class net.sf.saxon.value.SequenceValue
`convertToJava, display, effectiveBooleanValue, equals, evaluateAsString, evaluateItem, getCardinality, getImplementationMethod, getStringValue, hashCode, materialize, process`

Methods inherited from class net.sf.saxon.value.Value
`analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, getSpecialProperties, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, toString, trimWhitespace`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SequenceIntent

    public SequenceIntent(SequenceIterator iterator)

  Construct a SequenceIntent by supplying an iterator. Note that the caller must ensure this is a "clean" iterator: it must be positioned at the start, and must not be shared by anyone else. It is also required (at present) that the iterator should return items in the correct sequence.

Parameters:
  `iterator` - the iterator that delivers the items in the sequence. It must deliver them in the correct order, with no duplicates.

Method Detail

### getItemType

    public ItemType getItemType()

  Get the item type

  Specified by:
    `getItemType` in interface `Expression`
  Overrides:
    `getItemType` in class `SequenceValue`
  Returns:
    AnyItemType (not known)

### iterate

    public SequenceIterator iterate(XPathContext context)
                             throws XPathException

  Evaluate the expression in a given context to return a sequence

  Parameters:
    `context` - the evaluation context.
  Returns:
    a SequenceIterator that can be used to iterate over the result of the expression
  Throws:
    `XPathException` - if any dynamic error occurs evaluating the expression

### itemAt

    public Item itemAt(int n)
                throws XPathException

  Get the n'th item in the sequence (starting from 0). This is defined for all SequenceValues, but its real benefits come for a SequenceValue stored extensionally

  Overrides:
    `itemAt` in class `SequenceValue`
    `XPathException`