Class Metric.Builder

  • Enclosing class:
    Metric

    public static class Metric.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public Metric.Builder name​(String name)
        The name of the metric.

        This must be a known metric name.

        Parameters:
        name - the value to set
        Returns:
        this builder
      • valueSource

        public Metric.Builder valueSource​(String valueSource)
        This must not be set.
        Parameters:
        valueSource - the value to set
        Returns:
        this builder
      • unit

        public Metric.Builder unit​(String unit)
        The unit of the metric.
        Parameters:
        unit - the value to set
        Returns:
        this builder
      • description

        public Metric.Builder description​(String description)
        A description of the metric.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • build

        public Metric build()