Package net.sf.saxon.tree.tiny

## Class Statistics

- java.lang.Object
- - net.sf.saxon.tree.tiny.Statistics

-     public class Statistics
      extends java.lang.Object

  Statistics on the size of TinyTree instances, kept so that the system can learn how much space to allocate to new trees

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Statistics()` |
    `Statistics​(int nodes, int atts, int namespaces, int chars)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `double` | `getAverageAttributes()` |
    `double` | `getAverageCharacters()` |
    `double` | `getAverageNamespaces()` |
    `double` | `getAverageNodes()` |
    `java.lang.String` | `toString()` |
    `void` | `updateStatistics​(int numberOfNodes, int numberOfAttributes, int numberOfNamespaces, int chars)` | Update the statistics held in static data.

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

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

- - ### Constructor Detail

    - #### Statistics

          public Statistics()

    - #### Statistics

          public Statistics​(int nodes,
                            int atts,
                            int namespaces,
                            int chars)

  - ### Method Detail

    - #### getAverageNodes

          public double getAverageNodes()

    - #### getAverageAttributes

          public double getAverageAttributes()

    - #### getAverageNamespaces

          public double getAverageNamespaces()

    - #### getAverageCharacters

          public double getAverageCharacters()

    - #### updateStatistics

          public void updateStatistics​(int numberOfNodes,
                                       int numberOfAttributes,
                                       int numberOfNamespaces,
                                       int chars)

      Update the statistics held in static data. We don't bother to sychronize, on the basis that it doesn't matter if the stats are wrong.
      Parameters:
        `numberOfNodes` - the number of (non-attribute, non-namespace) nodes
        `numberOfAttributes` - the number of attribute nodes
        `numberOfNamespaces` - the number of namespace bindings (deltas on namespace nodes)
        `chars` - the number of characters in text nodes

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`