net.sf.nachocalendar.tasks

Class TaskDataModel


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.
Collection
getTasks(Date date)
Returns a Collection with all the tasks related to a provided Date.
void
removeTask(Task task)
Removes a task from the model.

Constructor Details

TaskDataModel

public TaskDataModel()
Creates a new instance of TaskDataModel.

Method Details

addTask

public void addTask(Task task)
Adds a new Task to the model.
Parameters:
task - the task to be added

getTasks

public Collection getTasks(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