| java.lang.Object | |
| ↳ | com.google.android.gms.fitness.data.Value |
Holder object for the value of a single field in a data point.
Values are not constructed directly; a value for each field of the data type
is created for each data point.
A field value has a particular format, and should be set and read using the
format-specific methods. For instance, a float value should be set via setFloat(float)
and read via asFloat().
Formats are defined as constants in Field
|
[Expand]
Inherited Constants | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||||||||
From interface
com.google.android.gms.common.internal.safeparcel.SafeParcelable
| |||||||||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CREATOR | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the value of this object as a float.
| |||||||||||
Returns the value of this object as an int.
| |||||||||||
Returns the format of this value, which matches the appropriate field in the
data type definition.
| |||||||||||
Returns
true if this object's value has been set by calling one of the setters.
| |||||||||||
Updates this value object to represent a float value.
| |||||||||||
Updates this value object to represent an int value.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||||||||||||||||||||||||
From interface
android.os.Parcelable
| |||||||||||||||||||||||||||||||||
Returns the value of this object as a float.
| IllegalStateException | if the object does not hold an float value |
|---|
Returns the value of this object as an int.
| IllegalStateException | if the object does not hold an int value |
|---|
Returns true if this object's value has been set by calling one of the setters.
Updates this value object to represent a float value. Any previous values associated with this object are erased.
| value | the new value that this objects holds |
|---|
Updates this value object to represent an int value. Any previous values are erased.
| value | the new value that this object holds |
|---|