Class MetadataBuilder


  • public class MetadataBuilder
    extends Object
    The Metadata builder. All values are considered "not present" by default. Name must be set before build() is called.
    • Constructor Detail

      • MetadataBuilder

        public MetadataBuilder()
    • Method Detail

      • withDescription

        public MetadataBuilder withDescription​(String description)
        Sets the description.
        Parameters:
        description - the name, empty string is considered as "not present" (null)
        Returns:
        the builder instance
      • withUnit

        public MetadataBuilder withUnit​(String unit)
        Sets the unit.
        Parameters:
        unit - the unit, MetricUnits.NONE is considered as "not present" (null)
        Returns:
        the builder instance