Class 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 Detail

      • Statistics

        public Statistics()
      • Statistics

        public Statistics​(int nodes,
                          int atts,
                          int namespaces,
                          int chars)
    • Method Detail

      • getAverageNodes

        public int getAverageNodes()
      • getAverageAttributes

        public int getAverageAttributes()
      • getAverageNamespaces

        public int getAverageNamespaces()
      • getAverageCharacters

        public int getAverageCharacters()
      • updateStatistics

        public void updateStatistics​(int numberOfNodes,
                                     int numberOfAttributes,
                                     int numberOfNamespaces,
                                     LargeTextBuffer textBuffer)
        Update the statistics held in static data. We don't bother to synchronize, 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)
        textBuffer - the text buffer
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object