com.saxonica.xslt3.instruct

## Class MergeGroupingIterator.ManualMergGroupingIterator

- java.lang.Object
- - net.sf.saxon.tree.iter.ManualIterator
  - - com.saxonica.stream.ManualGroupIterator
    - - com.saxonica.xslt3.instruct.MergeGroupingIterator.ManualMergGroupingIterator

- All Implemented Interfaces:
    LastPositionFinder, GroupIterator, SequenceIterator, GroundedIterator, LookaheadIterator, ReversibleIterator, UnfailingIterator
  Enclosing class:
    MergeGroupingIterator

      public class MergeGroupingIterator.ManualMergGroupingIterator
      extends ManualGroupIterator

- - ### Field Summary

    - ### Fields inherited from interface net.sf.saxon.om.SequenceIterator

      `GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MergeGroupingIterator.ManualMergGroupingIterator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `UnfailingIterator` | `getAnother()` Get another iterator over the same sequence of items, positioned at the start of the sequence.
    `AtomicSequence` | `getCurrentGroupingKey()` Get the grouping key of the current group
    `int` | `getLength()` Get the last position (that is, the number of items in the sequence).
    `SequenceIterator<? extends Item>` | `iterateCurrentGroup()` Get an iterator over the members of the current group, in population order.

    - ### Methods inherited from class com.saxonica.stream.ManualGroupIterator

      `getSnapShot, hasCurrentGroup, hasCurrentGroupingKey, setGroupSlot, setKeySlot`

    - ### Methods inherited from class net.sf.saxon.tree.iter.ManualIterator

      `close, current, getProperties, getReverseIterator, hasNext, incrementPosition, materialize, next, position, setContextItem, setLastPositionFinder, setPosition`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.SequenceIterator

      `close, current, getProperties, next, position`

- - ### Constructor Detail

    - #### MergeGroupingIterator.ManualMergGroupingIterator

          public MergeGroupingIterator.ManualMergGroupingIterator()

  - ### Method Detail

    - #### iterateCurrentGroup

          public SequenceIterator<? extends Item> iterateCurrentGroup()
                                                               throws XPathException

      Description copied from interface: `GroupIterator`
      Get an iterator over the members of the current group, in population order. This must always be a clean iterator, that is, an iterator that starts at the first item of the group.
      Returns:
        an iterator over all the members of the current group, in population order.
      Throws:
        `XPathException` - if a dynamic error occurs

    - #### getCurrentGroupingKey

          public AtomicSequence getCurrentGroupingKey()

      Description copied from interface: `GroupIterator`
      Get the grouping key of the current group
      Returns:
        the current grouping key in the case of group-by or group-adjacent, or null in the case of group-starting-with and group-ending-with

    - #### getAnother

          public UnfailingIterator getAnother()

      Description copied from interface: `UnfailingIterator`
      Get another iterator over the same sequence of items, positioned at the start of the sequence. It must be possible to call this method at any time, whether none, some, or all of the items in the original iterator have been read. The method is non-destructive: it does not change the state of the original iterator.
      Specified by:
        `getAnother` in interface `SequenceIterator`
      Specified by:
        `getAnother` in interface `UnfailingIterator`
      Overrides:
        `getAnother` in class `ManualIterator`
      Returns:
        a new iterator over the same sequence

    - #### getLength

          public int getLength()
                        throws XPathException

      Description copied from interface: `LastPositionFinder`
      Get the last position (that is, the number of items in the sequence). This method is non-destructive: it does not change the state of the iterator. The result is undefined if the next() method of the iterator has already returned null. This method must not be called unless the result of getProperties() on the iterator includes the bit setting `SequenceIterator.LAST_POSITION_FINDER`
      Specified by:
        `getLength` in interface `LastPositionFinder`
      Overrides:
        `getLength` in class `ManualIterator`
      Returns:
        the number of items in the sequence
      Throws:
        `XPathException` - if an error occurs evaluating the sequence in order to determine the number of items

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