Goal.Recurrence

  • Goal.Recurrence represents a recurrence period for a recurring goal.

  • It includes constants for representing days, weeks, and months as units of recurrence.

  • The class provides methods to get the count and unit of the recurrence period.

  • Goal.Recurrence implements the Parcelable interface, allowing it to be written to and read from a Parcel.

public static class Goal.Recurrence extends Object
implements Parcelable

A recurrence period of a recurring goal.

Nested Class Summary

@interface
Unit of a recurrence. 

Constant Summary

int UNIT_DAY Unit constant representing a day.
int UNIT_MONTH Unit constant representing a month.
int UNIT_WEEK Unit constant representing a week.

Inherited Constant Summary

Field Summary

public static final Creator < Goal.Recurrence > CREATOR

Public Constructor Summary

Recurrence (int count, int unit)

Public Method Summary

boolean
equals ( Object other)
int
getCount ()
Returns the count of unit of the recurrence.
int
getUnit ()
Returns the unit of the recurrence.
int
String
void
writeToParcel ( Parcel dest, int flags)

Inherited Method Summary

Constants

public static final int UNIT_DAY

Unit constant representing a day.

Constant Value: 1

public static final int UNIT_MONTH

Unit constant representing a month.

Constant Value: 3

public static final int UNIT_WEEK

Unit constant representing a week.

Constant Value: 2

Fields

public static final Creator < Goal.Recurrence > CREATOR

Public Constructors

public Recurrence (int count, int unit)

Public Methods

public boolean equals ( Object other)

public int getCount ()

Returns the count of unit of the recurrence. For example, it would return '3' for a goal that recurs every 3 days.

public int getUnit ()

Returns the unit of the recurrence. The unit should be one of UNIT_DAY , UNIT_WEEK and UNIT_MONTH .

public int hashCode ()

public String toString ()

public void writeToParcel ( Parcel dest, int flags)

Create a Mobile Website
View Site in Mobile | Classic
Share by: