com.benfante.splasher.task
Interface Task

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AbstractTask, FakeTask, SimpleTask

public interface Task
extends java.lang.Runnable

The interface that must be implemented by task classes.

Version:
$Id: Task.java,v 1.1.1.1 2006-04-01 05:41:35 lucio Exp $
Author:
Lucio Benfante lucio@benfante.com

Method Summary
 void add(TaskObserver observer)
          Add a task observer.
 int getCompleted()
          Return the percent of completion of the task.
 java.lang.String getDescription()
          Return the description of the task.
 int getWeight()
          Return the weight of the task.
 boolean isCompleted()
          Check if the task is completed.
 void notifyChanges()
          Notify changes to the task observer(s).
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

add

void add(TaskObserver observer)
Add a task observer.

Parameters:
observer - The task observer that will be notified about changes on this task.

notifyChanges

void notifyChanges()
Notify changes to the task observer(s).


getDescription

java.lang.String getDescription()
Return the description of the task.

Returns:
The description of the task.

getWeight

int getWeight()
Return the weight of the task.

Returns:
The weight of the task.

getCompleted

int getCompleted()
Return the percent of completion of the task.

Returns:
The percent of completion of the task.

isCompleted

boolean isCompleted()
Check if the task is completed.

Returns:
true if the task is completed.