Class MetadataBuilder

    • Constructor Detail

      • MetadataBuilder

        public MetadataBuilder​()
    • Method Detail

      • withName

        public MetadataBuilder withName​(java.lang.String name)
        Sets the name
        Parameters:
        name - the name
        Returns:
        the builder instance
        Throws:
        java.lang.NullPointerException - when name is null
      • withDisplayName

        public MetadataBuilder withDisplayName​(java.lang.String displayName)
        Sets the displayName
        Parameters:
        displayName - the displayName
        Returns:
        the builder instance
        Throws:
        java.lang.NullPointerException - when displayName is null
      • withDescription

        public MetadataBuilder withDescription​(java.lang.String description)
        Sets the description
        Parameters:
        description - the name
        Returns:
        the builder instance
        Throws:
        java.lang.NullPointerException - when description is null
      • withType

        public MetadataBuilder withType​(MetricType type)
        Sets the type
        Parameters:
        type - the name
        Returns:
        the builder instance
        Throws:
        java.lang.NullPointerException - when type is null
      • withUnit

        public MetadataBuilder withUnit​(java.lang.String unit)
        Sets the unit
        Parameters:
        unit - the name
        Returns:
        the builder instance
        Throws:
        java.lang.NullPointerException - when unit is null
      • reusable

        public MetadataBuilder reusable​()
        Sets the reusable to Boolean.TRUE
        Returns:
        the builder instance
      • notReusable

        public MetadataBuilder notReusable​()
        Sets the reusable to Boolean.FALSE
        Returns:
        the builder instance
      • build

        public Metadata build​()
        Returns:
        An object implementing Metadata from the provided properties
        Throws:
        java.lang.IllegalStateException - when either name is null