T
- the type of the metric valuepublic class JabbixMetric<T>
extends java.lang.Object
Constructor and Description |
---|
JabbixMetric(java.lang.String key,
java.lang.Class<T> type,
T value)
Constructs a new metric with the specified name and value type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" the metric.
|
java.lang.String |
getKey()
Returns the name of the metric.
|
T |
getValue()
Returns the value of the metric.
|
java.lang.Class<T> |
getValueType()
Returns a class for the value type of the metric.
|
java.lang.String |
toString()
Returns the textual string representation of the value.
|
void |
updateValue(java.lang.Object value)
Updates the value of the metric.
|
public java.lang.String getKey()
public T getValue()
public void updateValue(java.lang.Object value) throws java.lang.ClassCastException
value
- the new valuejava.lang.ClassCastException
- if type of the new value is incompatible with the value type
of the metricMetricTable.updateMetric(JabbixMetric)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.Class<T> getValueType()