public class TimerTask extends Object implements Cloneable, Comparable<TimerTask>, Serializable
Modifier and Type | Field and Description |
---|---|
protected List<TimerAlert> |
alerts
Task alerts.
|
protected SortedMap<Date,String> |
allDaysAnnotations
Map date -> annotation text.
|
protected SortedMap<Date,Long> |
allDaysTimes
Map calendar of day -> time (ms).
|
protected boolean |
closed
Closed task.
|
protected Date |
creationDate
Creation date.
|
protected String |
name
Task name.
|
protected int |
number
Task number.
|
protected TimerTask |
parent
Parent Task.
|
protected List<TimerTask> |
subTasks
Sub tasks.
|
protected String |
uuid
Task uuid used to managed task equality.
|
Constructor and Description |
---|
TimerTask()
Constructor.
|
TimerTask(String name)
Constructor with name.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlert(TimerAlert alert)
Add alert.
|
void |
addAnnotation(Date date,
String note)
Add annotation.
|
boolean |
addTask(TimerTask t)
Add task's subtask.
|
TimerTask |
clone()
Clone task.
|
int |
compareTo(TimerTask o) |
boolean |
equals(Object o) |
List<TimerAlert> |
getAlerts()
Get alert list.
|
SortedMap<Date,Long> |
getAllDaysAndTimes()
Return all data.
|
SortedMap<Date,String> |
getAllDaysAnnotations()
Return all annotation, sorted on date.
|
Date |
getCreationDate()
Get task creation date.
|
String |
getName()
Get task name.
|
int |
getNumber()
Get task number.
|
TimerTask |
getParent()
Get parent.
|
List<TimerTask> |
getSubTasks()
Get task's subtasks.
|
long |
getTime(Date date)
Get time at date.
|
int |
hashCode() |
boolean |
isClosed()
Get closed task state.
|
void |
setAlert(List<TimerAlert> alerts)
Set alert.
|
void |
setClosed(boolean closed)
Set closed.
|
void |
setCreationDate(Date creationDate)
Set task creation date.
|
void |
setName(String name)
Set task name.
|
void |
setNumber(int number)
Set task number.
|
protected void |
setParent(TimerTask parent)
Set parent.
|
void |
setTime(Date date,
Long time)
Add time.
|
String |
toString() |
protected String uuid
protected int number
protected String name
protected Date creationDate
protected boolean closed
protected TimerTask parent
protected SortedMap<Date,Long> allDaysTimes
protected List<TimerAlert> alerts
public TimerTask()
public TimerTask(String name)
name
- task namepublic int getNumber()
public void setNumber(int number)
number
- the number to setpublic String getName()
public void setName(String name)
name
- the name to setpublic Date getCreationDate()
public void setCreationDate(Date creationDate)
creationDate
- creation datepublic boolean isClosed()
public void setClosed(boolean closed)
closed
- closedpublic TimerTask getParent()
protected void setParent(TimerTask parent)
parent
- the parent to setpublic boolean addTask(TimerTask t)
t
- the task to addpublic long getTime(Date date)
date
- datepublic SortedMap<Date,Long> getAllDaysAndTimes()
public void addAnnotation(Date date, String note)
date
- datenote
- note textpublic SortedMap<Date,String> getAllDaysAnnotations()
public void addAlert(TimerAlert alert)
alert
- public List<TimerAlert> getAlerts()
public void setAlert(List<TimerAlert> alerts)
alerts
- new alerts listpublic int compareTo(TimerTask o)
compareTo
in interface Comparable<TimerTask>
Copyright © 2007–2013 CodeLutin. All rights reserved.