Package org.jfree.data.gantt
Class TaskSeries
- java.lang.Object
-
- org.jfree.data.general.Series
-
- org.jfree.data.gantt.TaskSeries
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class TaskSeries extends Series
A series that contains zero, one or manyTask
objects.This class is used as a building block for the
TaskSeriesCollection
class that can be used to construct basic Gantt charts.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List
tasks
Storage for the tasks in the series.
-
Constructor Summary
Constructors Constructor Description TaskSeries(java.lang.String name)
Constructs a new series with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Task task)
Adds a task to the series and sends aSeriesChangeEvent
to all registered listeners.boolean
canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals.java.lang.Object
clone()
Returns an independent copy of this series.boolean
equals(java.lang.Object obj)
Tests this object for equality with an arbitrary object.Task
get(int index)
Returns a task from the series.Task
get(java.lang.String description)
Returns the task in the series that has the specified description.int
getItemCount()
Returns the number of items in the series.java.util.List
getTasks()
Returns an unmodifialble list of the tasks in the series.int
hashCode()
Returns a hash code.void
remove(Task task)
Removes a task from the series and sends aSeriesChangeEvent
to all registered listeners.void
removeAll()
Removes all tasks from the series and sends aSeriesChangeEvent
to all registered listeners.-
Methods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
-
-
-
Method Detail
-
add
public void add(Task task)
Adds a task to the series and sends aSeriesChangeEvent
to all registered listeners.- Parameters:
task
- the task (null
not permitted).
-
remove
public void remove(Task task)
Removes a task from the series and sends aSeriesChangeEvent
to all registered listeners.- Parameters:
task
- the task.
-
removeAll
public void removeAll()
Removes all tasks from the series and sends aSeriesChangeEvent
to all registered listeners.
-
getItemCount
public int getItemCount()
Returns the number of items in the series.- Specified by:
getItemCount
in classSeries
- Returns:
- The item count.
-
get
public Task get(int index)
Returns a task from the series.- Parameters:
index
- the task index (zero-based).- Returns:
- The task.
-
get
public Task get(java.lang.String description)
Returns the task in the series that has the specified description.- Parameters:
description
- the name (null
not permitted).- Returns:
- The task (possibly
null
).
-
getTasks
public java.util.List getTasks()
Returns an unmodifialble list of the tasks in the series.- Returns:
- The tasks.
-
equals
public boolean equals(java.lang.Object obj)
Tests this object for equality with an arbitrary object.
-
canEqual
public boolean canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.
-
hashCode
public int hashCode()
Description copied from class:Series
Returns a hash code.
-
-