net.sf.nachocalendar.tasks
Class TaskDataModel

java.lang.Object
  extended bynet.sf.nachocalendar.model.DefaultDataModel
      extended bynet.sf.nachocalendar.tasks.TaskDataModel
All Implemented Interfaces:
DataModel

public class TaskDataModel
extends DefaultDataModel

Implementation of the interface DataModel, created to manage tasks.

Author:
Ignacio Merani

Constructor Summary
TaskDataModel()
          Creates a new instance of TaskDataModel.
 
Method Summary
 void addTask(Task task)
          Adds a new Task to the model.
 java.util.Collection getTasks(java.util.Date date)
          Returns a Collection with all the tasks related to a provided Date.
 void removeTask(Task task)
          Removes a task from the model.
 
Methods inherited from class net.sf.nachocalendar.model.DefaultDataModel
addData, addDataModelListener, clear, getAll, getData, getSize, removeData, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskDataModel

public TaskDataModel()
Creates a new instance of TaskDataModel.

Method Detail

addTask

public void addTask(Task task)
Adds a new Task to the model.

Parameters:
task - the task to be added

getTasks

public java.util.Collection getTasks(java.util.Date date)
Returns a Collection with all the tasks related to a provided Date.

Parameters:
date - the Date requested
Returns:
Collection with values or null

removeTask

public void removeTask(Task task)
Removes a task from the model.

Parameters:
task - task to be removed