| Modifier and Type | Method and Description |
|---|---|
Metric |
build()
Builds a new
Metric. |
Metric.Builder |
from(Metric instance)
Fill a builder with attribute values from the provided
Metric instance. |
Metric.Builder |
unit(String unit)
Initializes the value for the
unit attribute. |
Metric.Builder |
value(Double value)
Initializes the value for the
value attribute. |
public final Metric.Builder from(Metric instance)
Metric instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final Metric.Builder unit(String unit)
unit attribute.unit - The value for unit (can be null)this builder for use in a chained invocationpublic final Metric.Builder value(Double value)
value attribute.value - The value for value (can be null)this builder for use in a chained invocationpublic Metric build()
Metric.IllegalStateException - if any required attributes are missingCopyright © 2021. All rights reserved.