org.jdtaus.core.monitor
Class Task

java.lang.Object
  extended byorg.jdtaus.core.monitor.Task
All Implemented Interfaces:
Cloneable, Serializable

public abstract class Task
extends Object
implements Cloneable, Serializable

A task of execution.

A task is a sequence of operations taking time. If property is , properties , and hold information regarding the progress of the task.

Version:
$Id: Task.java 2916 2007-04-20 19:43:03Z schulte2005 $
Author:
Christian Schulte
See Also:
TaskEventSource, Serialized Form

Constructor Summary
Task()
          Creates a new instance.
 
Method Summary
 Object clone()
          Creates and returns a copy of this object.
 boolean equals(Object o)
          Indicates whether some other object is equal to this one.
abstract  Message getDescription()
          Getter for property .
 int getMaximum()
          Gets the higher end of the progress value.
 int getMinimum()
          Gets the lower end of the progress value.
 int getProgress()
          Gets the progress of the task.
 int hashCode()
          Returns a hash code value for this object.
 boolean isIndeterminate()
          Flag indicating if the operations performed by the task are of unknown length.
 void setIndeterminate(boolean indeterminate)
          Setter for property .
 void setMaximum(int maximum)
          Sets the higher end of the progress value.
 void setMinimum(int minimum)
          Sets the lower end of the progress value.
 void setProgress(int progress)
          Sets the progress of the task.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task()
Creates a new instance.

Method Detail

clone

public Object clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

equals

public final boolean equals(Object o)
Indicates whether some other object is equal to this one.

Tasks internally cary a UID which is created during instantiation. This UID is used for comparing with the instance.

Parameters:
o - the reference object with which to compare.
Returns:
if this object is the same as ; otherwise.
See Also:
UID

getDescription

public abstract Message getDescription()
Getter for property .

Returns:
description of the task.

getMaximum

public final int getMaximum()
Gets the higher end of the progress value.

Returns:
an int representing the maximum value.

getMinimum

public final int getMinimum()
Gets the lower end of the progress value.

Returns:
an int representing the minimum value.

getProgress

public final int getProgress()
Gets the progress of the task.

Returns:
the progress of the task.

hashCode

public final int hashCode()
Returns a hash code value for this object.

Returns:
a hash code value for this object.

isIndeterminate

public final boolean isIndeterminate()
Flag indicating if the operations performed by the task are of unknown length.

Returns:
if the operations performed by the task are of unknown length; if properties , and hold progress information.

setIndeterminate

public final void setIndeterminate(boolean indeterminate)
Setter for property .

Parameters:
indeterminate - if the operations performed by the task are of unknown length; if properties , and hold progress information.

setMaximum

public final void setMaximum(int maximum)
Sets the higher end of the progress value.

Parameters:
maximum - an int specifying the maximum value.

setMinimum

public final void setMinimum(int minimum)
Sets the lower end of the progress value.

Parameters:
minimum - an int specifying the minimum value.

setProgress

public final void setProgress(int progress)
Sets the progress of the task.

Parameters:
progress - an int specifying the current value, between the maximum and minimum specified for this task.
Throws:
IllegalArgumentException - if is lower than the minimum of the range or greater than the maximum of the range.

toString

public String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.


Copyright © 2005-2007 jDTAUS. All Rights Reserved.