Package org.eclipse.microprofile.metrics
Class DefaultMetadata
java.lang.Object
org.eclipse.microprofile.metrics.DefaultMetadata
- All Implemented Interfaces:
Metadata
The default implementation of
Metadata-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultMetadata(String name, String displayName, String description, MetricType type, String unit) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the description of the metric if set, otherwise this method returns the emptyString.Returns the display name if set, otherwise this method returns the metric name.getName()Returns the metric name.getType()Returns the String representation of theMetricType.Returns theMetricTypeof the metric if set, otherwise it returnsMetricType.INVALIDgetUnit()Returns the unit of this metric if set, otherwise this method returnsMetricUnits.NONEinthashCode()toString()unit()
-
Constructor Details
-
DefaultMetadata
protected DefaultMetadata(String name, String displayName, String description, MetricType type, String unit)
-
-
Method Details
-
getName
Description copied from interface:MetadataReturns the metric name. -
getDisplayName
Description copied from interface:MetadataReturns the display name if set, otherwise this method returns the metric name.- Specified by:
getDisplayNamein interfaceMetadata- Returns:
- the display name
-
displayName
- Specified by:
displayNamein interfaceMetadata
-
getDescription
Description copied from interface:MetadataReturns the description of the metric if set, otherwise this method returns the emptyString.- Specified by:
getDescriptionin interfaceMetadata- Returns:
- the description
-
description
- Specified by:
descriptionin interfaceMetadata
-
getType
Description copied from interface:MetadataReturns the String representation of theMetricType. -
getTypeRaw
Description copied from interface:MetadataReturns theMetricTypeof the metric if set, otherwise it returnsMetricType.INVALID- Specified by:
getTypeRawin interfaceMetadata- Returns:
- the
MetricType
-
getUnit
Description copied from interface:MetadataReturns the unit of this metric if set, otherwise this method returnsMetricUnits.NONE -
unit
-
equals
-
hashCode
public int hashCode() -
toString
-