Class TopMetricsBase


  • public class TopMetricsBase
    extends java.lang.Object
    Author:
    Alex Usun
    • Constructor Detail

      • TopMetricsBase

        public TopMetricsBase​(java.util.Map<java.lang.String,​NamedEntry> entries)
      • TopMetricsBase

        public TopMetricsBase()
    • Method Detail

      • setEntries

        public void setEntries​(NamedEntry[] entries)
      • reset

        public void reset()
      • getKeys

        public java.lang.String[] getKeys()
        Returns an array of keys sorted by values descending.
        Returns:
        an array of keys
      • getValue

        public long getValue​(java.lang.String key)
        Return the value for the provided key.
        Parameters:
        key - the key
        Returns:
        the value for the provided key
        Throws:
        java.lang.IllegalArgumentException - if no value for this key
      • getEntry

        public NamedEntry getEntry​(java.lang.String name)
      • incrementEntry

        public void incrementEntry​(java.lang.String name)