public static class

Goal.DurationObjective

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

Class Overview

A duration objective, which uses duration time of activities to determine whether the goal is met. e.g. 30 minutes, 2 hours.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Goal.DurationObjective> CREATOR
Public Constructors
Goal.DurationObjective(long duration, TimeUnit timeUnit)
Public Methods
boolean equals(Object that)
long getDuration(TimeUnit timeUnit)
Returns the objective duration of the goal in the specified time unit.
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.DurationObjective> CREATOR

Public Constructors

public Goal.DurationObjective (long duration, TimeUnit timeUnit)

Parameters
duration long
timeUnit TimeUnit

Public Methods

public boolean equals (Object that)

Parameters
that Object
Returns
boolean

public long getDuration (TimeUnit timeUnit)

Returns the objective duration of the goal in the specified time unit. e.g. Returns 30 minutes for a goal to "walk 30 minutes a day".

Parameters
timeUnit TimeUnit
Returns
long

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int