Package org.sonar.api.ce.measure
Interface Measure
-
- All Known Implementing Classes:
TestMeasure
public interface Measure
Measure used inMeasureComputer
- Since:
- 5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getBooleanValue()
The value of this measure as a boolean.double
getDoubleValue()
The value of this measure as a double.int
getIntValue()
The value of this measure as a integer.long
getLongValue()
The value of this measure as a long.java.lang.String
getStringValue()
The value of this measure as a string.
-
-
-
Method Detail
-
getIntValue
int getIntValue()
The value of this measure as a integer.- Throws:
java.lang.IllegalStateException
- if the value type of the metric is not an Integer as defined byMetric.ValueType.valueClass
To find out the value type of a metric, check it's definition (eg., core metrics are defined inCoreMetrics
).
-
getLongValue
long getLongValue()
The value of this measure as a long.- Throws:
java.lang.IllegalStateException
- if the value type of the metric is not a Long as defined byMetric.ValueType.valueClass
To find out the value type of a metric, check it's definition (eg., core metrics are defined inCoreMetrics
).
-
getDoubleValue
double getDoubleValue()
The value of this measure as a double.- Throws:
java.lang.IllegalStateException
- if the value type of the metric is not a Double as defined byMetric.ValueType.valueClass
. To find out the value type of a metric, check it's definition (eg., core metrics are defined inCoreMetrics
).
-
getStringValue
java.lang.String getStringValue()
The value of this measure as a string.- Throws:
java.lang.IllegalStateException
- if the value type of the metric is not a String as defined byMetric.ValueType.valueClass
To find out the value type of a metric, check it's definition (eg., core metrics are defined inCoreMetrics
).
-
getBooleanValue
boolean getBooleanValue()
The value of this measure as a boolean.- Throws:
java.lang.IllegalStateException
- if the value type of the metric is not a Boolean as defined byMetric.ValueType.valueClass
To find out the value type of a metric, check it's definition (eg., core metrics are defined inCoreMetrics
).
-
-