Package com.saxonica.functions.extfn

## Class GroupStarting

- java.lang.Object
- - net.sf.saxon.functions.AbstractFunction
  - - net.sf.saxon.functions.SystemFunction
    - - com.saxonica.functions.extfn.GroupStarting

- All Implemented Interfaces:
    `Callable`, `Function`, `GroundedValue`, `Item`, `Sequence`

      public class GroupStarting
      extends SystemFunction

  This class supports the extension function saxon:group-starting. This takes two arguments: the first is a sequence of items, the second is a function used as a predicate. The function is applied to each item in the sequence: if the effective boolean value of the result is true, the item is called a matching item. The result of the function is a sequence of arrays, where the members of each array are single items, and the flattened sequence of arrays is the same as the input sequence.

  If the input sequence is empty, the result sequence is empty.

  In all other cases (a) the first item in the result is an array containing those items from the input that precede the first matching item; this array will be empty if the first item in the input is a matching item; (b) every other item in the result is an non-empty array containing a subsequence of the input in which the first member is a matching item and the remaining members are non-matching items.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ZeroOrMore<ArrayItem>` | `call​(XPathContext context, Sequence[] arguments)` | Evaluate this function call at run-time

    - ### Methods inherited from class net.sf.saxon.functions.SystemFunction

      `dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller`

    - ### Methods inherited from class net.sf.saxon.functions.AbstractFunction

      `atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck`

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

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

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

      `getGenre`

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

      `asIterable, concatenate, containsNode, materialize`

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

      `getLength, head, isStreamed, itemAt, iterate, reduce, subsequence`

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

      `makeRepeatable`

- - ### Constructor Detail

    - #### GroupStarting

          public GroupStarting()

  - ### Method Detail

    - #### call

          public ZeroOrMore<ArrayItem> call​(XPathContext context,
                                            Sequence[] arguments)
                                     throws XPathException

      Evaluate this function call at run-time
      Parameters:
        `context` - The XPath dynamic evaluation context
        `arguments` - The values of the arguments to the function call.
      Returns:
        the results of the function, as a sequence of arrays
      Throws:
        `XPathException` - if a dynamic error occurs during evaluation of the function. The Saxon run-time code will add information about the error location.