Hyperic HQ Plugin API v. 2.5.dev

net.hyperic.hq.product
Class MetricValue

java.lang.Object
  extended bynet.hyperic.hq.product.MetricValue
All Implemented Interfaces:
java.lang.Comparable, net.hyperic.util.data.IComparableDatapoint, net.hyperic.util.data.IDataPoint, net.hyperic.util.data.IDisplayDataPoint, java.io.Serializable

public class MetricValue
extends java.lang.Object
implements net.hyperic.util.data.IDisplayDataPoint, net.hyperic.util.data.IComparableDatapoint, java.io.Serializable

Represents a value of a Metric.

See Also:
MeasurementPluginManager.getValue(java.lang.String), MeasurementPlugin.getValue(net.hyperic.hq.product.Metric), Serialized Form

Constructor Summary
MetricValue()
           
MetricValue(double value)
          Default retrieval time to System.currentTimeMillis()
MetricValue(double value, long rtime)
           
MetricValue(long value, long rtime)
           
MetricValue(MetricValue objectValue, long rtime)
           
MetricValue(java.lang.Number objectValue)
          Default retrieval time to System.currentTimeMillis()
MetricValue(java.lang.Number objectValue, long rtime)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          This is for the Datapoint interface.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLabel()
           
 java.lang.Double getObjectValue()
           
 long getTimestamp()
           
 double getValue()
           
 void setTimestamp(long t)
           
 void setValue(double value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricValue

public MetricValue()

MetricValue

public MetricValue(double value,
                   long rtime)

MetricValue

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


MetricValue

public MetricValue(java.lang.Number objectValue,
                   long rtime)

MetricValue

public MetricValue(java.lang.Number objectValue)
Default retrieval time to System.currentTimeMillis()


MetricValue

public MetricValue(MetricValue objectValue,
                   long rtime)

MetricValue

public MetricValue(long value,
                   long rtime)
Method Detail

toString

public java.lang.String toString()

getObjectValue

public java.lang.Double getObjectValue()

getValue

public double getValue()
Specified by:
getValue in interface net.hyperic.util.data.IDataPoint

setValue

public void setValue(double value)

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface net.hyperic.util.data.IDisplayDataPoint

setTimestamp

public void setTimestamp(long t)

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface net.hyperic.util.data.IDisplayDataPoint

compareTo

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

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)

Hyperic HQ Plugin API v. 2.5.dev

Copyright © 2004-2005 Hyperic LLC support@hyperic.net, All Rights Reserved.