Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.bytecode.map
Class ForSequenceMappingAction

    java.lang.Object
      com.saxonica.bytecode.map.ForSequenceMappingAction

All Implemented Interfaces:
  MappingFunction, StatefulMappingFunction

    public abstract class ForSequenceMappingAction

extends Object
implements MappingFunction, StatefulMappingFunction

The ForSequenceMappingAction supports compilation of a ForExpression. It represents the action to be taken for each item in the source sequence. It acts as the MappingFunction for the mapping iterator. The map() method is generated in the subclass, and performs the "action" part of the for expression, being called once per iteration, and returning an iterator over the results.

Field Summary
`protected XPathContext` | `context`
`protected int` | `position`

Constructor Summary
`ForSequenceMappingAction()`

Method Summary
`StatefulMappingFunction` | `getAnother()` Return a clone of this MappingFunction, with the state reset to its state at the beginning of the underlying iteration
`abstract SequenceIterator` | `map(Item item)` Map one item to a sequence.
`void` | `setContext(XPathContext context)`

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

Field Detail

### context

    protected XPathContext context

### position

    protected int position

Constructor Detail

### ForSequenceMappingAction

    public ForSequenceMappingAction()

Method Detail

### setContext

    public void setContext(XPathContext context)

### map

    public abstract SequenceIterator map(Item item)
                                  throws XPathException

  Description copied from interface: `MappingFunction`
  Map one item to a sequence.

  Specified by:
    `map` in interface `MappingFunction`
  Parameters:
    `item` - The item to be mapped.
  Returns:
    one of the following: (a) a SequenceIterator over the sequence of items that the supplied input item maps to, or (b) null if it maps to an empty sequence.
  Throws:
    `XPathException` - if a dynamic error occurs

### getAnother

    public StatefulMappingFunction getAnother()

  Description copied from interface: `StatefulMappingFunction`
  Return a clone of this MappingFunction, with the state reset to its state at the beginning of the underlying iteration

  Specified by:
    `getAnother` in interface `StatefulMappingFunction`
  Returns:
    a clone of this MappingFunction

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.