Metric

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

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

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

Functions

Link copied to clipboard
fun doubleThreshold(): Double

Specified threshold for this metric as a double value.

Link copied to clipboard
fun doubleValue(): Double

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.

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

Properties

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