| Modifier | Constructor and Description |
|---|---|
protected |
DefaultMetadata(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
MetricType type,
java.lang.String unit) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.String> |
description() |
java.util.Optional<java.lang.String> |
displayName() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDescription()
Returns the description of the metric if set, otherwise this method returns the empty
String. |
java.lang.String |
getDisplayName()
Returns the display name if set, otherwise this method returns the metric name.
|
java.lang.String |
getName()
Returns the metric name.
|
java.lang.String |
getType()
Returns the String representation of the
MetricType. |
MetricType |
getTypeRaw()
Returns the
MetricType of the metric if set, otherwise it returns MetricType.INVALID |
java.lang.String |
getUnit()
Returns the unit of this metric if set, otherwise this method returns
MetricUnits.NONE |
int |
hashCode() |
java.lang.String |
toString() |
java.util.Optional<java.lang.String> |
unit() |
protected DefaultMetadata(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
MetricType type,
java.lang.String unit)
public java.lang.String getName()
Metadatapublic java.lang.String getDisplayName()
MetadatagetDisplayName in interface Metadatapublic java.util.Optional<java.lang.String> displayName()
displayName in interface Metadatapublic java.lang.String getDescription()
MetadataString.getDescription in interface Metadatapublic java.util.Optional<java.lang.String> description()
description in interface Metadatapublic java.lang.String getType()
MetadataMetricType.getType in interface MetadataMetricTypepublic MetricType getTypeRaw()
MetadataMetricType of the metric if set, otherwise it returns MetricType.INVALIDgetTypeRaw in interface MetadataMetricTypepublic java.lang.String getUnit()
MetadataMetricUnits.NONEpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object