|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.benfante.splasher.task.AbstractTask
public abstract class AbstractTask
Base implementation for task classes.
| Field Summary | |
|---|---|
protected int |
completed
The percent of completion of the task |
static int |
COMPLETED
|
protected java.lang.String |
description
|
protected int |
weight
|
| Constructor Summary | |
|---|---|
AbstractTask(java.lang.String description,
int weight)
Creates a new instance of AbstractTask. |
|
| 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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Field Detail |
|---|
public static final int COMPLETED
protected java.lang.String description
protected int weight
protected int completed
| Constructor Detail |
|---|
public AbstractTask(java.lang.String description,
int weight)
description - A description for the taskweight - The weight of this task (relative to the other tasks)| Method Detail |
|---|
public void add(TaskObserver observer)
add in interface Taskobserver - The task observer that will be notified about changes
on this task.public int getCompleted()
getCompleted in interface Taskpublic java.lang.String getDescription()
getDescription in interface Taskpublic int getWeight()
getWeight in interface Taskpublic boolean isCompleted()
isCompleted in interface Taskpublic void notifyChanges()
notifyChanges in interface Task
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||