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()
Metadata
public java.lang.String getDisplayName()
Metadata
getDisplayName
in interface Metadata
public java.util.Optional<java.lang.String> displayName()
displayName
in interface Metadata
public java.lang.String getDescription()
Metadata
String
.getDescription
in interface Metadata
public java.util.Optional<java.lang.String> description()
description
in interface Metadata
public java.lang.String getType()
Metadata
MetricType
.getType
in interface Metadata
MetricType
public MetricType getTypeRaw()
Metadata
MetricType
of the metric if set, otherwise it returns MetricType.INVALID
getTypeRaw
in interface Metadata
MetricType
public java.lang.String getUnit()
Metadata
MetricUnits.NONE
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object