public class Habit
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HABIT_URI_FORMAT |
Constructor and Description |
---|
Habit()
Constructs a habit with default attributes.
|
Habit(Habit model)
Constructs a habit with the same attributes as the specified habit.
|
Modifier and Type | Method and Description |
---|---|
void |
clearReminder()
Clears the reminder for a habit.
|
void |
copyFrom(Habit model)
Copies all the attributes of the specified habit into this habit
|
java.lang.Integer |
getArchived()
Flag that indicates whether the habit is archived.
|
CheckmarkList |
getCheckmarks()
List of checkmarks belonging to this habit.
|
java.lang.Integer |
getColor()
Color of the habit.
|
java.lang.String |
getDescription()
Description of the habit
|
java.lang.Integer |
getFreqDen()
Frequency denominator.
|
java.lang.Integer |
getFreqNum()
Frequency numerator.
|
java.lang.Integer |
getHighlight()
Not currently used.
|
java.lang.Long |
getId() |
java.lang.String |
getName()
Name of the habit
|
ModelObservable |
getObservable() |
java.lang.Integer |
getReminderDays()
Days of the week the reminder should be shown.
|
java.lang.Integer |
getReminderHour()
Hour of the day the reminder should be shown.
|
java.lang.Integer |
getReminderMin()
Minute the reminder should be shown.
|
RepetitionList |
getRepetitions()
List of repetitions belonging to this habit.
|
ScoreList |
getScores()
List of scores belonging to this habit.
|
SQLiteStreakList |
getStreaks()
List of streaks belonging to this habit.
|
android.net.Uri |
getUri()
Returns the public URI that identifies this habit
|
boolean |
hasReminder()
Checks whether the habit has a reminder set.
|
boolean |
isArchived()
Returns whether the habit is archived or not.
|
void |
setArchived(java.lang.Integer archived) |
void |
setColor(java.lang.Integer color) |
void |
setDescription(java.lang.String description) |
void |
setFreqDen(java.lang.Integer freqDen) |
void |
setFreqNum(java.lang.Integer freqNum) |
void |
setHighlight(java.lang.Integer highlight) |
void |
setId(java.lang.Long id) |
void |
setName(java.lang.String name) |
void |
setReminderDays(java.lang.Integer reminderDays) |
void |
setReminderHour(java.lang.Integer reminderHour) |
void |
setReminderMin(java.lang.Integer reminderMin) |
public static final java.lang.String HABIT_URI_FORMAT
public Habit(Habit model)
model
- the model whose attributes should be copied frompublic Habit()
The habit is not archived, not highlighted, has no reminders and is placed in the last position of the list of habits.
public void clearReminder()
public void copyFrom(@NonNull Habit model)
model
- the model whose attributes should be copied frompublic java.lang.Integer getArchived()
@NonNull public CheckmarkList getCheckmarks()
public java.lang.Integer getColor()
This number is not an android.graphics.Color, but an index to the activity color palette, which changes according to the theme. To convert this color into an android.graphics.Color, use ColorHelper.getColor(context, habit.color).
public void setColor(java.lang.Integer color)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public java.lang.Integer getFreqDen()
public void setFreqDen(java.lang.Integer freqDen)
public java.lang.Integer getFreqNum()
public void setFreqNum(java.lang.Integer freqNum)
public java.lang.Integer getHighlight()
public void setHighlight(java.lang.Integer highlight)
public java.lang.Long getId()
public void setId(java.lang.Long id)
public java.lang.String getName()
public void setName(java.lang.String name)
public ModelObservable getObservable()
@NonNull public java.lang.Integer getReminderDays()
public void setReminderDays(@NonNull java.lang.Integer reminderDays)
@Nullable public java.lang.Integer getReminderHour()
public void setReminderHour(@Nullable java.lang.Integer reminderHour)
@Nullable public java.lang.Integer getReminderMin()
public void setReminderMin(@Nullable java.lang.Integer reminderMin)
@NonNull public RepetitionList getRepetitions()
@NonNull public ScoreList getScores()
@NonNull public SQLiteStreakList getStreaks()
public android.net.Uri getUri()
public boolean hasReminder()
public boolean isArchived()
public void setArchived(java.lang.Integer archived)