org.rhq.enterprise.gui.common.servlet
Class HighLowMetricValue

java.lang.Object
  extended by org.rhq.enterprise.gui.legacy.beans.NumericMetricDataPoint
      extended by org.rhq.enterprise.gui.common.servlet.HighLowMetricValue
All Implemented Interfaces:
Serializable, Comparable, IComparableDatapoint, IDataPoint, IDisplayDataPoint, IHighLowDataPoint, IStackedDataPoint

public class HighLowMetricValue
extends NumericMetricDataPoint
implements IHighLowDataPoint

Represents the value of a numeric metric.

See Also:
MeasurementPluginManager#getValue, MeasurementPlugin#getValue, Serialized Form

Constructor Summary
HighLowMetricValue(double value)
          Default retrieval time to System.currentTimeMillis()
HighLowMetricValue(double value, double highValue, double lowValue, long rtime)
          Full constructor - ultimately called by all other constructors.
HighLowMetricValue(double value, long rtime)
          Construct with values.
HighLowMetricValue(HighLowMetricValue objectValue, long rtime)
           
HighLowMetricValue(long value, long rtime)
           
HighLowMetricValue(org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite dataPoint)
           
HighLowMetricValue(Number objectValue, long rtime)
          one can always extend and override getRetrievalTime to be more robust.
 
Method Summary
 int compareTo(Object o)
          This is for the Datapoint interface.
 boolean equals(Object obj)
           
 int getCount()
           
 double getHighValue()
          Retrieves the high value of a chart data point.
 String getLabel()
          Retrieves the label of a chart data point.
 double getLowValue()
          Retrieves the low value of a chart data point.
 Double getObjectValue()
          Get the Object value.
 double[] getValues()
          Retrieves the value of a chart data point.
 void setCount(int count)
           
 void setHighValue(double highValue)
           
 void setLowValue(double lowValue)
           
 
Methods inherited from class org.rhq.enterprise.gui.legacy.beans.NumericMetricDataPoint
getTimestamp, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rhq.enterprise.gui.image.data.IDisplayDataPoint
getTimestamp
 
Methods inherited from interface org.rhq.enterprise.gui.image.data.IDataPoint
getValue
 

Constructor Detail

HighLowMetricValue

public HighLowMetricValue(double value,
                          double highValue,
                          double lowValue,
                          long rtime)
Full constructor - ultimately called by all other constructors.


HighLowMetricValue

public HighLowMetricValue(double value,
                          long rtime)
Construct with values.


HighLowMetricValue

public HighLowMetricValue(double value)
Default retrieval time to System.currentTimeMillis()


HighLowMetricValue

public HighLowMetricValue(Number objectValue,
                          long rtime)
one can always extend and override getRetrievalTime to be more robust.


HighLowMetricValue

public HighLowMetricValue(HighLowMetricValue objectValue,
                          long rtime)

HighLowMetricValue

public HighLowMetricValue(long value,
                          long rtime)

HighLowMetricValue

public HighLowMetricValue(org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite dataPoint)
Method Detail

getObjectValue

public Double getObjectValue()
Get the Object value. Useful if you don't yet care what the type is.

Overrides:
getObjectValue in class NumericMetricDataPoint

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
Overrides:
getLabel in class NumericMetricDataPoint
Returns:
A String label for a chart data point.

getLowValue

public double getLowValue()
Description copied from interface: IHighLowDataPoint
Retrieves the low value of a chart data point.

Specified by:
getLowValue in interface IHighLowDataPoint
Returns:
A floating point value for a chart data point.

setLowValue

public void setLowValue(double lowValue)

getHighValue

public double getHighValue()
Description copied from interface: IHighLowDataPoint
Retrieves the high value of a chart data point.

Specified by:
getHighValue in interface IHighLowDataPoint
Returns:
A floating point value for a chart data point.

setHighValue

public void setHighValue(double highValue)

setCount

public void setCount(int count)

getCount

public int getCount()

compareTo

public int compareTo(Object o)
This is for the Datapoint interface. It compares only the value of the measurements, not the timestamp.

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class NumericMetricDataPoint

equals

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

getValues

public double[] getValues()
Description copied from interface: IStackedDataPoint
Retrieves the value of a chart data point. The label is displayed on the X axis for stacked performance charts.

Specified by:
getValues in interface IStackedDataPoint
Returns:
A floating point value for a chart data point.


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