public final class MeterValue
extends java.lang.Object
Double (applicable to timers and distribution summaries) or a
Duration (applicable to only timers).| Modifier and Type | Method and Description |
|---|---|
java.lang.Double |
getValue(io.micrometer.core.instrument.Meter.Type meterType)
Return the underlying value in form suitable to apply to the given meter type.
|
static MeterValue |
valueOf(double value)
Return a new
MeterValue instance for the given double value. |
static MeterValue |
valueOf(long value)
Deprecated.
as of 2.3.0 in favor of
valueOf(double) |
static MeterValue |
valueOf(java.lang.String value)
Return a new
MeterValue instance for the given String value. |
public java.lang.Double getValue(io.micrometer.core.instrument.Meter.Type meterType)
meterType - the meter typenull if the value cannot be appliedpublic static MeterValue valueOf(java.lang.String value)
MeterValue instance for the given String value. The value may
contain a simple number, or a duration style string.value - the source valueMeterValue instance@Deprecated public static MeterValue valueOf(long value)
valueOf(double)MeterValue instance for the given long value.value - the source valueMeterValue instancepublic static MeterValue valueOf(double value)
MeterValue instance for the given double value.value - the source valueMeterValue instance