Package net.sf.saxon.expr.sort

## Class GroupByIterator.ManualGroupByIterator

- java.lang.Object
- - net.sf.saxon.tree.iter.ManualIterator
  - - com.saxonica.ee.stream.ManualGroupIterator
    - - net.sf.saxon.expr.sort.GroupByIterator.ManualGroupByIterator

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`, `LastPositionFinder`, `GroupIterator`, `FocusIterator`, `SequenceIterator`, `GroundedIterator`, `LookaheadIterator`, `ReversibleIterator`, `UnfailingIterator`
  Enclosing class:
    GroupByIterator

      public class GroupByIterator.ManualGroupByIterator
      extends ManualGroupIterator

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator

      `SequenceIterator.Property`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ManualGroupByIterator()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AtomicSequence` | `getCurrentGroupingKey()` | Get the grouping key of the current group
    `int` | `getLength()` | Get the position of the last item in the sequence
    `SequenceIterator` | `iterateCurrentGroup()` | Get an iterator over the members of the current group, in population order.

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

      `appendToCurrentGroup, currentGroupContains, getSnapShot, setCurrentGroup, setCurrentGroupingKey, startNewCurrentGroup`

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

      `current, getProperties, getResidue, 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, forEachOrFail, getProperties`

    - ### Methods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator

      `forEach, toList`

- - ### Constructor Detail

    - #### ManualGroupByIterator

          public ManualGroupByIterator()

  - ### Method Detail

    - #### iterateCurrentGroup

          public SequenceIterator iterateCurrentGroup()

      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.
      Specified by:
        `iterateCurrentGroup` in interface `GroupIterator`
      Overrides:
        `iterateCurrentGroup` in class `ManualGroupIterator`
      Returns:
        an iterator over all the members of the current group, in population order.

    - #### getCurrentGroupingKey

          public AtomicSequence getCurrentGroupingKey()

      Description copied from interface: `GroupIterator`
      Get the grouping key of the current group
      Specified by:
        `getCurrentGroupingKey` in interface `GroupIterator`
      Overrides:
        `getCurrentGroupingKey` in class `ManualGroupIterator`
      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

    - #### getLength

          public int getLength()
                        throws XPathException

      Description copied from interface: `FocusIterator`
      Get the position of the last item in the sequence
      Specified by:
        `getLength` in interface `FocusIterator`
      Specified by:
        `getLength` in interface `LastPositionFinder`
      Overrides:
        `getLength` in class `ManualIterator`
      Returns:
        the position of the last item
      Throws:
        `XPathException` - if a failure occurs reading the sequence