Class AbstractProfileMonitor

java.lang.Object
clazzfish.jdbc.monitor.AbstractProfileMonitor
All Implemented Interfaces:
ProfileMonitor, Comparable<ProfileMonitor>
Direct Known Subclasses:
JamonMonitor, SimpleProfileMonitor

public abstract class AbstractProfileMonitor extends Object implements ProfileMonitor
The Class AbstractProfileMonitor.
Since:
27.12.2008
Version:
$Revision: 1.19 $
Author:
oliver
  • Constructor Details

    • AbstractProfileMonitor

      public AbstractProfileMonitor()
  • Method Details

    • compareTo

      public final int compareTo(ProfileMonitor other)
      The ProfileMonitor with the higher number of totals is considered as "greater".
      Specified by:
      compareTo in interface Comparable<ProfileMonitor>
      Parameters:
      other - the other ProfileMonitor
      Returns:
      0 if both ProfileMonitors has the same result and the same label
    • getLastTime

      public final String getLastTime()
      Gets the last value as time string. It returns the same result as ProfileMonitor.getLastValue() but in a human readable format. The english locale is used for formatting because this method is normally used for logging (which should be normally done in English).
      Specified by:
      getLastTime in interface ProfileMonitor
      Returns:
      the last time (e.g. "42 seconds")
      Since:
      1.4.2
    • equals

      public boolean equals(Object obj)
      If we impmlement the Comparable.compareTo(Object) method we should also implement/overwrite the Object.equals(Object) method. For the result of the equals method we use not the result of Comparable.compareTo(Object) but the label of the other object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the other
      Returns:
      true, if successful
      See Also:
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
      See Also: