Package org.jfree.data.gantt
Class Task
java.lang.Object
org.jfree.data.gantt.Task
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable
A simple representation of a task. The task has a description and a
duration. You can add sub-tasks to the task.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubtask(Task subtask) Adds a sub-task to the task.booleanEnsures symmetry between super/subclass implementations of equals.clone()Returns a clone of the task.booleanTests this object for equality with an arbitrary object.Returns the task description.Returns the duration (actual or estimated) of the task.Returns the percentage complete for this task.getSubtask(int index) Returns a sub-task.intReturns the sub-task count.inthashCode()voidremoveSubtask(Task subtask) Removes a sub-task from the task.voidsetDescription(String description) Sets the task description.voidsetDuration(TimePeriod duration) Sets the task duration (actual or estimated).voidsetPercentComplete(double percent) Sets the percentage complete for the task.voidsetPercentComplete(Double percent) Sets the percentage complete for the task.
-
Constructor Details
-
Task
Creates a new task.- Parameters:
description- the task description (nullnot permitted).duration- the task duration (nullpermitted).
-
Task
Creates a new task.- Parameters:
description- the task description (nullnot permitted).start- the start date (nullnot permitted).end- the end date (nullnot permitted).
-
-
Method Details
-
getDescription
Returns the task description.- Returns:
- The task description (never
null).
-
setDescription
Sets the task description.- Parameters:
description- the description (nullnot permitted).
-
getDuration
Returns the duration (actual or estimated) of the task.- Returns:
- The task duration (possibly
null).
-
setDuration
Sets the task duration (actual or estimated).- Parameters:
duration- the duration (nullpermitted).
-
getPercentComplete
Returns the percentage complete for this task.- Returns:
- The percentage complete (possibly
null).
-
setPercentComplete
Sets the percentage complete for the task.- Parameters:
percent- the percentage (nullpermitted).
-
setPercentComplete
Sets the percentage complete for the task.- Parameters:
percent- the percentage.
-
addSubtask
Adds a sub-task to the task.- Parameters:
subtask- the subtask (nullnot permitted).
-
removeSubtask
Removes a sub-task from the task.- Parameters:
subtask- the subtask.
-
getSubtaskCount
Returns the sub-task count.- Returns:
- The sub-task count.
-
getSubtask
Returns a sub-task.- Parameters:
index- the index.- Returns:
- The sub-task.
-
equals
Tests this object for equality with an arbitrary object. -
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
-
clone
Returns a clone of the task.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- never thrown by this class, but subclasses may not support cloning.
-