Class PerformanceMetrics

java.lang.Object
org.deltava.beans.stats.PerformanceMetrics
All Implemented Interfaces:
Serializable, Comparable<PerformanceMetrics>, AuthoredBean

public class PerformanceMetrics extends Object implements Serializable, AuthoredBean, Comparable<PerformanceMetrics>
A bean to track performance metrics data.
Since:
1.0
Version:
7.2
Author:
Luke
See Also:
  • Constructor Details

    • PerformanceMetrics

      public PerformanceMetrics(String catName)
      Creates a new performance metrics bean.
      Parameters:
      catName - the category name
      Throws:
      NullPointerException - if catName is null
      See Also:
  • Method Details

    • getName

      public String getName()
      Returns the category name.
      Returns:
      the name
    • getCount

      public long getCount()
      Returns the category count.
      Returns:
      the count
    • getAverage

      public double getAverage()
      Returns the average.
      Returns:
      the average
    • getMaximum

      public double getMaximum()
      Returns the maximum value.
      Returns:
      the maximum
    • getMinimum

      public double getMinimum()
      Returns the minimum value.
      Returns:
      the minimum
    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      Returns:
      the author's database ID
      See Also:
    • setName

      public void setName(String name)
      Updates the category name.
      Parameters:
      name - the category name
      Throws:
      NullPointerException - if name is null
    • setAverage

      public void setAverage(double avg)
      Updates the average value.
      Parameters:
      avg - the average
    • setCount

      public void setCount(long count)
      Updates the category count.
      Parameters:
      count - the count
    • setLimits

      public void setLimits(double mn, double mx)
      Updates the data series limits.
      Parameters:
      mn - the minimum
      mx - the maximum
    • setAuthorID

      public void setAuthorID(int id)
      Description copied from interface: AuthoredBean
      Updates the author of this bean.
      Specified by:
      setAuthorID in interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • compareTo

      public int compareTo(PerformanceMetrics m2)
      Compares two entries by comparing their category names.
      Specified by:
      compareTo in interface Comparable<PerformanceMetrics>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object