Goal.MetricObjective

public static class Goal.MetricObjective extends Object
implements Parcelable

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

Inherited Constant Summary

Field Summary

public static final Creator<Goal.MetricObjective> CREATOR

Public Constructor Summary

MetricObjective(String dataTypeName, double value, double initialValue)
MetricObjective(String dataTypeName, double value)

Public Method Summary

boolean
equals(Object other)
String
getDataTypeName()
Returns the data type name of the metric the goal tracks, such as com.google.step_count.delta or com.google.distance.delta.
double
getValue()
Returns the objective metric's value.
int
String
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<Goal.MetricObjective> CREATOR

Public Constructors

public MetricObjective (String dataTypeName, double value, double initialValue)

public MetricObjective (String dataTypeName, double value)

Public Methods

public boolean equals (Object other)

public String getDataTypeName ()

Returns the data type name of the metric the goal tracks, such as com.google.step_count.delta or com.google.distance.delta. For example, returns "com.google.step_count.delta" for a goal to "take 10k steps a day".

public double getValue ()

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

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)