This site requires javascript.
Android Code Search
file:androidx/health/connect/client/units/Power.kt symbol:watts
search
close
info_outline
more_vert
Result 1 of 1
content_copy
Search Result Root
androidx/platform/frameworks/support
keyboard_arrow_right
Branch
Branch
androidx-main
keyboard_arrow_right
Search Result Path
health/connect/connect-client/src/main/java/androidx/health/connect/client/units/
Power.kt
content_copy
Preview
31:
32:
33:
@
get
:JvmName(
"getWatts"
)
val
in
Watts
: Double
get
() = value * type.wattsPerUnit
71:
72:
73:
/** Creates [Power] with the specified value in Watts. */
@JvmStatic
fun
watts
(value: Double): Power = Power(value, Type.WATTS)
79:
80:
81:
82:
private
enum
class
Type {
WATTS
{
override
val
watts
PerUnit: Double =
1.0
override
val
title: String =
"Watts"
84:
85:
86:
KILOCALORIES_PER_DAY {
override
val
watts
PerUnit: Double =
0.0484259259
override
val
title: String =
"kcal/day"
89:
90:
abstract
val
watts
PerUnit: Double
abstract
val
title: String
95:
96:
97:
@
get
:JvmSynthetic
val
Double.
watts
: Power
get
() = Power.watts(value = this)
100:
101:
102:
@
get
:JvmSynthetic
val
Long.
watts
: Power
get
() = toDouble().watts
105:
106:
107:
@
get
:JvmSynthetic
val
Float.
watts
: Power
get
() = toDouble().watts
110:
111:
112:
@
get
:JvmSynthetic
val
Int.
watts
: Power
get
() = toDouble().watts
chevron_left
1
chevron_right
Results per page
10
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Got it
Help
Open branch androidx-main