ValidatorTool

Methods and constants for validating user profile values.

Properties

Link copied to clipboard
const val AGE_BOTTOM: Int = 18

Minimum supported user age.

Link copied to clipboard
const val AGE_DEFAULT: Int = 36

Default age.

Link copied to clipboard
const val AGE_TOP: Int = 100

Maximum supported user age.

Link copied to clipboard
const val ARM_LENGTH_BOTTOM: Int = 40

Minimum arm length.

Link copied to clipboard
const val ARM_LENGTH_DEFAULT: Int = 60

Default arm length.

Link copied to clipboard
Link copied to clipboard
const val ARM_LENGTH_TOP: Int = 90

Maximum arm length.

Link copied to clipboard

Default water drunk at once volume value in ml.

Link copied to clipboard
const val DIASTOLIC_BOTTOM: Int = 40
Link copied to clipboard
const val DIASTOLIC_DEFAULT: Int = 80
Link copied to clipboard
Link copied to clipboard
const val DIASTOLIC_TOP: Int = 100
Link copied to clipboard
const val HEIGHT_BOTTOM: Int = 50

Minimum supported user height in cm.

Link copied to clipboard
Link copied to clipboard
const val HEIGHT_TOP: Int = 230

Maximum supported user height in cm.

Link copied to clipboard
@get:JvmName(name = "getIsoCodes")
val ISO_CODES: List<String>

List of available ISO codes.

Link copied to clipboard
const val NAME_PATTERN: String

Regexp pattern to validate name strings.

Link copied to clipboard
const val PRESSURE_DELTA_BOTTOM: Int = 20
Link copied to clipboard
Link copied to clipboard
const val PRESSURE_DELTA_TOP: Int = 100
Link copied to clipboard
const val PULSE_BOTTOM: Int = 40
Link copied to clipboard
Link copied to clipboard
const val PULSE_TOP: Int = 100
Link copied to clipboard
const val REST_BOTTOM: Int = 0

Minimum value for rest offset and rest duration.

Link copied to clipboard
Link copied to clipboard
const val REST_TOP: Int

Maximum value for rest offset and rest duration.

Link copied to clipboard

Minimum resting heart rate.

Link copied to clipboard

Default resting heart rate value.

Link copied to clipboard
const val RESTING_HEART_RATE_TOP: Int = 100

Maximum resting heart rate.

Link copied to clipboard
const val SLEEP_BOTTOM: Int = 240

Minimum comfortable sleep duration in minutes.

Link copied to clipboard
const val SLEEP_DEFAULT: Int = 480

Default comfortable sleep duration in minutes.

Link copied to clipboard
Link copied to clipboard
const val SLEEP_TOP: Int = 840

Maximum comfortable sleep duration in minutes.

Link copied to clipboard
const val STEP_BOTTOM: Int = 30

Minimum step length value.

Link copied to clipboard
const val STEP_DEFAULT: Int = 70

Default step length value.

Link copied to clipboard
Link copied to clipboard
const val STEP_TOP: Int = 90

Maximum step length value.

Link copied to clipboard
const val SYSTOLIC_BOTTOM: Int = 60
Link copied to clipboard
const val SYSTOLIC_DEFAULT: Int = 120
Link copied to clipboard
Link copied to clipboard
const val SYSTOLIC_TOP: Int = 180
Link copied to clipboard
const val VOLUME_BOTTOM: Int = 50

Minimum water drunk at once volume value in ml.

Link copied to clipboard
Link copied to clipboard
const val VOLUME_TOP: Int = 400

Maximum water drunk at once volume value in ml.

Link copied to clipboard
const val WEIGHT_BOTTOM: Double = 30.0

Minimum supported user weight in kg.

Link copied to clipboard
Link copied to clipboard
const val WEIGHT_TOP: Double = 200.0

Maximum supported user weight in kg.

Functions

Link copied to clipboard

Check is isoCode string is valid ISO code.

Link copied to clipboard
fun isNumberInEdges(number: Float, edges: FloatArray): Boolean
fun isNumberInEdges(number: Int, edges: IntRange): Boolean
Link copied to clipboard
fun isValidBirthDate(birthDate: YMD): Boolean

Check is birth date within acceptable limits.