org.rhq.enterprise.gui.legacy.beans
Class NumericMetricDataPoint

java.lang.Object
  extended by org.rhq.enterprise.gui.legacy.beans.NumericMetricDataPoint
All Implemented Interfaces:
Serializable, Comparable, IComparableDatapoint, IDataPoint, IDisplayDataPoint
Direct Known Subclasses:
HighLowMetricValue

public class NumericMetricDataPoint
extends Object
implements IDisplayDataPoint, IComparableDatapoint, Serializable

A numeric metric data point that can be plotted on a chart.

Author:
Ian Springer
See Also:
Serialized Form

Constructor Summary
NumericMetricDataPoint(org.rhq.enterprise.server.measurement.AvailabilityPoint availabilityPoint)
           
NumericMetricDataPoint(org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite dataPoint)
           
 
Method Summary
 int compareTo(Object obj)
          This is for the Datapoint interface.
 boolean equals(Object obj)
           
 String getLabel()
          Retrieves the label of a chart data point.
 Double getObjectValue()
           
 long getTimestamp()
           
 double getValue()
          Retrieves the value of a chart data point.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumericMetricDataPoint

public NumericMetricDataPoint(org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite dataPoint)

NumericMetricDataPoint

public NumericMetricDataPoint(org.rhq.enterprise.server.measurement.AvailabilityPoint availabilityPoint)
Method Detail

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface IDisplayDataPoint
Returns:
The absolute time of the datum, in milliseconds.

getLabel

public String getLabel()
Description copied from interface: IDisplayDataPoint
Retrieves the label of a chart data point. The data point is charted on the X axis for line and column charts.

Specified by:
getLabel in interface IDisplayDataPoint
Returns:
A String label for a chart data point.

getValue

public double getValue()
Description copied from interface: IDataPoint
Retrieves the value of a chart data point. The label is displayed on the Y axis for line and column charts.

Specified by:
getValue in interface IDataPoint
Returns:
A floating point value for a chart data point.

getObjectValue

public Double getObjectValue()

compareTo

public int compareTo(Object obj)
This is for the Datapoint interface. It compares only the values of the measurements, not the timestamps.

Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.