public static class

Goal.MetricObjective

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.fitness.data.Goal.MetricObjective

Class Overview

A metric objective, which uses a metric value to determine whether the goal is met. Metrics include step, distance and calories. e.g. 10k steps, 3km, 2k calories.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Goal.MetricObjective> CREATOR
Public Constructors
Goal.MetricObjective(String dataTypeName, double value)
Public Methods
boolean equals(Object that)
String getDataTypeName()
Returns the data type name of the metric the goal tracks, like com.google.step_count.delta, com.google.distance.delta, etc.
double getValue()
Returns the objective metric's value.
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<Goal.MetricObjective> CREATOR

Public Constructors

public Goal.MetricObjective (String dataTypeName, double value)

Parameters
dataTypeName String
value double

Public Methods

public boolean equals (Object that)

Parameters
that Object
Returns
boolean

public String getDataTypeName ()

Returns the data type name of the metric the goal tracks, like com.google.step_count.delta, com.google.distance.delta, etc. e.g. Returns "com.google.step_count.delta" for a goal to "take 10k steps a day".

Returns
String

public double getValue ()

Returns the objective metric's value. e.g. Returns 10,000 for a goal to "take 10k steps a day".

Returns
double

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int