Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.image.chart
Class DataPoint

java.lang.Object
  extended by org.hyperic.image.chart.DataPoint
All Implemented Interfaces:
IDataPoint, IDisplayDataPoint
Direct Known Subclasses:
HighLowDataPoint, StackedDataPoint

public class DataPoint
extends java.lang.Object
implements IDisplayDataPoint

DataPoint holds a data and label for a single data point in a chart. A collection of DataPoint objects are used to chart a series of data points.


Constructor Summary
DataPoint(double value)
          Constructs a DataPoint object with the specified value and an empty label.
DataPoint(double value, long timestamp)
          Constructs a DataPoint object with the specified value and and specified label.
DataPoint(double value, java.lang.String label)
          Constructs a DataPoint object with the specified value and and specified label.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLabel()
          Retrieves the label of a chart data point.
 long getTimestamp()
          Retrieves the absolute time.
 double getValue()
          Retrieves the value of a chart data point.
 void setLabel(java.lang.String label)
          Sets the label of a chart data point.
 void setValue(double value)
          Sets the value of a chart data point.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataPoint

public DataPoint(double value)
Constructs a DataPoint object with the specified value and an empty label.

Parameters:
value - A floating point value for the object data point.

DataPoint

public DataPoint(double value,
                 long timestamp)
Constructs a DataPoint object with the specified value and and specified label.

Parameters:
value - A floating point value for the object's data point.
timestamp - A timestamp for the object's data point.

DataPoint

public DataPoint(double value,
                 java.lang.String label)
Constructs a DataPoint object with the specified value and and specified label.

Parameters:
value - A floating point value for the object's data point.
label - A String label for the object's data point.
Method Detail

getTimestamp

public long getTimestamp()
Retrieves the absolute time.

Specified by:
getTimestamp in interface IDisplayDataPoint
Returns:
A long value for the absolute time.

getLabel

public java.lang.String getLabel()
Retrieves the label of a chart data point.

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

setLabel

public void setLabel(java.lang.String label)
Sets the label of a chart data point. The label is displayed on the X axis for line and column charts.

Parameters:
label - A String label for a chart data point.

getValue

public double getValue()
Retrieves the value of a chart data point. The data point is charted 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.

setValue

public void setValue(double value)
Sets the value of a chart data point. The data point is charted on the Y axis for line and column charts.

Parameters:
value - A floating point value for a chart data point.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.