and.Mapping
Class GTask

java.lang.Object
  extended by and.Mapping.GTask
All Implemented Interfaces:
java.io.Serializable

public class GTask
extends java.lang.Object
implements java.io.Serializable

Class representing an application task

Author:
Sébastien Miquée
See Also:
Serialized Form

Constructor Summary
GTask()
          Default constructor.
GTask(int _n)
          Constructor.
 
Method Summary
 void addDependance(java.util.ArrayList<GTask> at)
          Add a dependencies list to the task.
 void addDependance(GTask _t)
          Add a dependency to the task.
 java.util.ArrayList<GTask> getDependencies()
          Return the task's dependencies list.
 int getNbDep()
          Return the amount of dependencies of the task.
 int getNum()
          Return the task's number.
 int getWeight()
          Return the task's weight.
 java.lang.String printDep()
          Return the task's dependencies list in a text form.
 void setWeight(int _p)
          Define the task's computing weight.
 java.lang.String toString()
          Return the task's number in a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GTask

public GTask()
Default constructor.


GTask

public GTask(int _n)
Constructor.

Parameters:
_n - Task number
Method Detail

addDependance

public void addDependance(GTask _t)
Add a dependency to the task.

Parameters:
_t - Dependency task

toString

public java.lang.String toString()
Return the task's number in a string.

Overrides:
toString in class java.lang.Object
Returns:
A String containing the task's number

addDependance

public void addDependance(java.util.ArrayList<GTask> at)
Add a dependencies list to the task.

Parameters:
at - The dependencies list

setWeight

public void setWeight(int _p)
Define the task's computing weight.

Parameters:
_p - The computing weight

getWeight

public int getWeight()
Return the task's weight.

Returns:
The task's weight

getDependencies

public java.util.ArrayList<GTask> getDependencies()
Return the task's dependencies list.

Returns:
The dependencies list

getNum

public int getNum()
Return the task's number.

Returns:
The task's number

getNbDep

public int getNbDep()
Return the amount of dependencies of the task.

Returns:
The amount of dependencies

printDep

public java.lang.String printDep()
Return the task's dependencies list in a text form.

Returns:
The String containing the dependencies list