Class ProcessingUnitStatistic

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ProcessingUnitStatistic add​(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter statisticCounterToAdd)
      Add a statistic counter
      ProcessingUnitStatistic add​(java.lang.String key, java.lang.Double value)
      Add a value to the statistic counter
      ProcessingUnitStatistic add​(java.lang.String key, java.lang.Long value)
      Add a value to the statistic counter
      boolean equals​(java.lang.Object obj)  
      com.github.toolarium.common.statistic.StatisticCounter get​(java.lang.String key)
      Gets the statistic counter
      com.github.toolarium.common.statistic.StatisticCounter getOrAdd​(java.lang.String key)
      Get or add a statistic counter
      int hashCode()  
      boolean hasKey​(java.lang.String key)
      Test if a key is defined or not
      boolean isEmpty()
      Check if the statistic if empty
      java.util.Set<java.lang.String> keySet()
      Returns the statistic key set
      com.github.toolarium.common.statistic.StatisticCounter put​(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter value)
      Put a statistic value
      int size()
      Get the size of the statistic elements
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProcessingUnitStatistic

        public ProcessingUnitStatistic()
        Constructor
      • ProcessingUnitStatistic

        public ProcessingUnitStatistic​(IProcessingUnitStatistic processingStatistic)
        Constructor
        Parameters:
        processingStatistic - the processing statistic
    • Method Detail

      • getOrAdd

        public com.github.toolarium.common.statistic.StatisticCounter getOrAdd​(java.lang.String key)
        Get or add a statistic counter
        Parameters:
        key - the key
        Returns:
        the statistic counter
        Throws:
        java.lang.IllegalArgumentException - In case of an invalid key
      • add

        public ProcessingUnitStatistic add​(java.lang.String key,
                                           java.lang.Long value)
        Add a value to the statistic counter
        Parameters:
        key - the key / name of the statistic
        value - the value to add
        Returns:
        this instance
      • add

        public ProcessingUnitStatistic add​(java.lang.String key,
                                           java.lang.Double value)
        Add a value to the statistic counter
        Parameters:
        key - the key / name of the statistic
        value - the value to add
        Returns:
        this instance
      • add

        public ProcessingUnitStatistic add​(java.lang.String key,
                                           com.github.toolarium.common.statistic.StatisticCounter statisticCounterToAdd)
        Add a statistic counter
        Parameters:
        key - the key
        statisticCounterToAdd - the statistic counter to add
        Returns:
        this instance
      • put

        public com.github.toolarium.common.statistic.StatisticCounter put​(java.lang.String key,
                                                                          com.github.toolarium.common.statistic.StatisticCounter value)
        Put a statistic value
        Parameters:
        key - the key
        value - the statistic value
        Returns:
        the previous set statistic value; otherwise null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

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