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. e.g. 10k steps, 3km, 2k calories.

Inherited Constant Summary

Field Summary

public static final Creator<Goal.MetricObjective> CREATOR

Public Constructor Summary

Goal.MetricObjective(String dataTypeName, double value, double initialValue)
Goal.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, like com.google.step_count.delta, com.google.distance.delta, etc.
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 Goal.MetricObjective (String dataTypeName, double value, double initialValue)

public Goal.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, 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".

public double getValue ()

Returns the objective metric's value. e.g. 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)