This site requires javascript.
Android Code Search
file:androidx/health/connect/client/units/Volume.kt symbol:liters
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/
Volume.kt
content_copy
Preview
32:
33:
34:
@
get
:JvmName(
"getLiters"
)
val
in
Liters
: Double
get
() = value * type.litersPerUnit
77:
78:
79:
80:
81:
82:
/** Creates [Volume] with the specified value in liters. */
@JvmStatic
fun
liters
(value: Double): Volume = Volume(value, Type.LITERS)
/** Creates [Volume] with the specified value in milliliters. */
@JvmStatic
fun
milli
liters
(value: Double): Volume = Volume(value, Type.MILLILITERS)
87:
88:
89:
private
enum
class
Type {
LITERS
{
override
val
liters
PerUnit: Double =
1.0
91:
92:
93:
},
MILLI
LITERS
{
override
val
liters
PerUnit: Double =
0.001
107:
108:
109:
@
get
:JvmSynthetic
val
Double.
liters
: Volume
get
() = Volume.liters(value = this)
112:
113:
114:
@
get
:JvmSynthetic
val
Long.
liters
: Volume
get
() = toDouble().liters
117:
118:
119:
@
get
:JvmSynthetic
val
Float.
liters
: Volume
get
() = toDouble().liters
122:
123:
124:
@
get
:JvmSynthetic
val
Int.
liters
: Volume
get
() = toDouble().liters
127:
128:
129:
@
get
:JvmSynthetic
val
Double.milli
liters
: Volume
get
() = Volume.milliliters(value = this)
unfold_more
Show 6 more matching lines
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