public class TimerTaskHelper extends Object
Modifier and Type | Field and Description |
---|---|
protected static Comparator<TimerTask> |
timerTaskComparator
Timer task comparator.
|
Modifier | Constructor and Description |
---|---|
protected |
TimerTaskHelper()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
collectionContainsTask(Collection<TimerTask> tasks,
TimerTask task)
Check if task is present in tasks collection and recursive subtasks.
|
static long |
getAllTotalTime(TimerTask task)
Get total task time including subtasks total time.
|
static List<String> |
getAnnotation(TimerTask task,
Date date)
Get all annotations of the day.
|
static Map<Date,String> |
getAnnotationMap(TimerTask task,
Date date)
Get all annotations of the day.
|
static Date |
getTaskFirstDateOfTiming(TimerTask task)
Get first date of timing for a task.
|
static Date |
getTaskLastDateOfTiming(TimerTask task)
Get last date of timing for a task.
|
static List<String> |
getTaskPath(TimerTask task)
Build task path.
|
static TimerProject |
getTaskProject(TimerTask task)
Return project associated to a task.
|
static long |
getTaskTime(TimerTask task)
Get total task time without subtasks time.
|
static long |
getTotalTime(TimerTask task,
Date date)
Get time for specified date including subtasks time.
|
static void |
removeAnnotation(TimerTask task,
Date date)
Remove all annotations of the day.
|
static List<TimerTask> |
sortTask(List<TimerTask> tasks)
Get tasks ordered alphabetically.
|
protected static Comparator<TimerTask> timerTaskComparator
public static List<TimerTask> sortTask(List<TimerTask> tasks)
tasks
- taskstasks
public static long getTaskTime(TimerTask task)
task
- task to get timepublic static long getAllTotalTime(TimerTask task)
task
- task to get timepublic static long getTotalTime(TimerTask task, Date date)
task
- taskdate
- date for daypublic static Date getTaskFirstDateOfTiming(TimerTask task)
task
- task to find timepublic static Date getTaskLastDateOfTiming(TimerTask task)
task
- task to find timepublic static TimerProject getTaskProject(TimerTask task)
task
- taskpublic static List<String> getTaskPath(TimerTask task)
task
- taskpublic static Map<Date,String> getAnnotationMap(TimerTask task, Date date)
date
- datetask
- the taskpublic static List<String> getAnnotation(TimerTask task, Date date)
date
- datetask
- the taskpublic static void removeAnnotation(TimerTask task, Date date)
task
- the taskdate
- datepublic static boolean collectionContainsTask(Collection<TimerTask> tasks, TimerTask task)
tasks
- task collection to search intotask
- task to searchtrue
if task has been foundCopyright © 2007–2013 CodeLutin. All rights reserved.