Package org.eclipse.microprofile.metrics
Class DefaultMetadata
- java.lang.Object
-
- org.eclipse.microprofile.metrics.DefaultMetadata
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultMetadata(String name, String description, String unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>description()booleanequals(Object o)StringgetDescription()Returns the description of the metric if set, otherwise this method returns the emptyString.StringgetName()Returns the metric name.StringgetUnit()Returns the unit of this metric if set, otherwise this method returnsMetricUnits.NONEinthashCode()StringtoString()Optional<String>unit()
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:MetadataReturns the metric name.
-
getDescription
public String 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
public Optional<String> description()
- Specified by:
descriptionin interfaceMetadata
-
getUnit
public String getUnit()
Description copied from interface:MetadataReturns the unit of this metric if set, otherwise this method returnsMetricUnits.NONE
-
-