detekt-api
1.21.0-RC2

# Metric

data class Metric ( val type: String , val value: Int , val threshold: Int , val isDouble: Boolean = false, val conversionFactor: Int = DEFAULT_FLOAT_CONVERSION_FACTOR)
Content copied to clipboard

Metric type, can be an integer or double value. Internally it is stored as an integer, but the conversion factor and is double attributes can be used to retrieve it as a double value.

## Constructors

Metric
Link copied to clipboard
fun Metric ( type: String , value: Double , threshold: Double , conversionFactor: Int = DEFAULT_FLOAT_CONVERSION_FACTOR)
Content copied to clipboard
Metric
Link copied to clipboard
fun Metric ( type: String , value: Int , threshold: Int , isDouble: Boolean = false, conversionFactor: Int = DEFAULT_FLOAT_CONVERSION_FACTOR)
Content copied to clipboard

## Functions

doubleThreshold
Link copied to clipboard
fun doubleThreshold (): Double
Content copied to clipboard

Specified threshold for this metric as a double value.

doubleValue
Link copied to clipboard
fun doubleValue (): Double
Content copied to clipboard

Convenient method to retrieve the raised value as a double. Internally the value is stored as an int with a conversion factor to not loose any precision in calculations.

toString
Link copied to clipboard
open override fun toString (): String
Content copied to clipboard

## Properties

conversionFactor
Link copied to clipboard
val conversionFactor : Int
Content copied to clipboard
isDouble
Link copied to clipboard
val isDouble : Boolean = false
Content copied to clipboard
threshold
Link copied to clipboard
val threshold : Int
Content copied to clipboard
type
Link copied to clipboard
val type : String
Content copied to clipboard
value
Link copied to clipboard
val value : Int
Content copied to clipboard