com.saxonica.xslt3.instruct

## Class Accumulator

- java.lang.Object
- - com.saxonica.xslt3.instruct.Accumulator

-     public class Accumulator
      extends Object

  Represents a single accumulator declared in an XSLT 3.0 stylesheet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Accumulator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StructuredQName` | `getFirstName()` Get the name of the pre-descent function
    `Expression` | `getInitialValueExpression()` Get the expression that computes the initial value of the accumulator
    `Mode` | `getPostDescentRules()` Get the set of rules for phase="end", held in the form of a Mode object
    `Mode` | `getPreDescentRules()` Get the set of rules for phase="start", held in the form of a Mode object
    `StructuredQName` | `getSecondName()` Get the name of the post-descent function
    `SequenceType` | `getType()` Get the declared type of the accumulator.
    `boolean` | `isStreamable()` Ask whether the accumulator is streamable
    `void` | `setFirstName(StructuredQName firstName)` Set the name of the pre-descent function
    `void` | `setInitialValueExpression(Expression initialValueExpression)` Set the expression that computes the initial value of the accumulator
    `void` | `setPostDescentRules(Mode postDescentRules)` Set the set of rules for phase="end", held in the form of a Mode object
    `void` | `setPreDescentRules(Mode preDescentRules)` Set the set of rules for phase="start", held in the form of a Mode object
    `void` | `setSecondName(StructuredQName secondName)` Set the name of the post-descent function
    `void` | `setStreamable(boolean streamable)` Say whether the accumulator is streamable
    `void` | `setType(SequenceType type)` Set the declared type of the accumulator.

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

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

- - ### Constructor Detail

    - #### Accumulator

          public Accumulator()

  - ### Method Detail

    - #### isStreamable

          public boolean isStreamable()

      Ask whether the accumulator is streamable
      Returns:
        true if it is streamable

    - #### setStreamable

          public void setStreamable(boolean streamable)

      Say whether the accumulator is streamable
      Parameters:
        `streamable` - true if it is streamable

    - #### getFirstName

          public StructuredQName getFirstName()

      Get the name of the pre-descent function
      Returns:
        the function name (always present)

    - #### setFirstName

          public void setFirstName(StructuredQName firstName)

      Set the name of the pre-descent function
      Parameters:
        `firstName` - the function name (always present)

    - #### getSecondName

          public StructuredQName getSecondName()

      Get the name of the post-descent function
      Returns:
        the function name, or null if none is defined

    - #### setSecondName

          public void setSecondName(StructuredQName secondName)

      Set the name of the post-descent function
      Parameters:
        `secondName` - the function name, or null if none is defined

    - #### getPreDescentRules

          public Mode getPreDescentRules()

      Get the set of rules for phase="start", held in the form of a Mode object
      Returns:
        the Mode object containing all the rules that apply to phase="start"

    - #### setPreDescentRules

          public void setPreDescentRules(Mode preDescentRules)

      Set the set of rules for phase="start", held in the form of a Mode object
      Parameters:
        `preDescentRules` - the Mode object containing all the rules that apply to phase="start"

    - #### getPostDescentRules

          public Mode getPostDescentRules()

      Get the set of rules for phase="end", held in the form of a Mode object
      Returns:
        the Mode object containing all the rules that apply to phase="end"

    - #### setPostDescentRules

          public void setPostDescentRules(Mode postDescentRules)

      Set the set of rules for phase="end", held in the form of a Mode object
      Parameters:
        `postDescentRules` - the Mode object containing all the rules that apply to phase="end"

    - #### getInitialValueExpression

          public Expression getInitialValueExpression()

      Get the expression that computes the initial value of the accumulator
      Returns:
        the initial value expression

    - #### setInitialValueExpression

          public void setInitialValueExpression(Expression initialValueExpression)

      Set the expression that computes the initial value of the accumulator
      Parameters:
        `initialValueExpression` - the initial value expression

    - #### getType

          public SequenceType getType()

      Get the declared type of the accumulator. The initial value and all intermediate values must conform to this type
      Returns:
        the declared type of the accumulator

    - #### setType

          public void setType(SequenceType type)

      Set the declared type of the accumulator. The initial value and all intermediate values must conform to this type
      Parameters:
        `type` - the declared type of the accumulator

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