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
constructor(type: String, value: Double, threshold: Double, conversionFactor: Int = DEFAULT_FLOAT_CONVERSION_FACTOR)
constructor(type: String, value: Int, threshold: Int, isDouble: Boolean = false, conversionFactor: Int = DEFAULT_FLOAT_CONVERSION_FACTOR)

Functions

Link copied to clipboard

Specified threshold for this metric as a double value.

Link 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.

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

Properties

Link copied to clipboard
Link copied to clipboard
val isDouble: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val value: Int