be.ac.ua.broker.input.tasks
Class WorkloadWM1

java.lang.Object
  extended by be.ac.ua.broker.input.tasks.WorkloadWM1
All Implemented Interfaces:
Workload, java.lang.Comparable<Workload>

public class WorkloadWM1
extends java.lang.Object
implements Workload

This class represents a workload of workload model one.

Author:
Vermeersch Kurt

Constructor Summary
WorkloadWM1(java.util.List<SubTask> part, int hoursTimeFrame)
          Constructor for WorkloadWM1
WorkloadWM1(TaskSpecification spec, SubTaskCollection coll)
          Constructor for WorkloadWM1
 
Method Summary
 int compareTo(Workload wl)
           
 java.util.Date getDeadline()
           
 int getHoursTimeFrame()
           
 int getLength()
           
 java.util.Date getStartDate()
           
 SubTaskCollection getTasks()
           
 TaskSpecification getTaskSpecification()
           
 int getWorkload(int j)
          Getter for the workload associated with a given task hour of the task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkloadWM1

public WorkloadWM1(TaskSpecification spec,
                   SubTaskCollection coll)
Constructor for WorkloadWM1

Parameters:
spec - specification of the task the workload belongs to
coll - collection of subTasks that belong to the workload

WorkloadWM1

public WorkloadWM1(java.util.List<SubTask> part,
                   int hoursTimeFrame)
Constructor for WorkloadWM1

Parameters:
part - collection of subTasks that belong to the workload
hoursTimeFrame - the number of hours between the start of the scheduling period and the deadline of the associated task
Method Detail

getTasks

public SubTaskCollection getTasks()
Returns:
the collection of subTasks that belong to the workload

getHoursTimeFrame

public int getHoursTimeFrame()
Returns:
the number of hours between the start of the scheduling period and the deadline of the associated task

getLength

public int getLength()
Specified by:
getLength in interface Workload
Returns:
the length in hours of the task/workload

getStartDate

public java.util.Date getStartDate()
Specified by:
getStartDate in interface Workload
Returns:
the start time of the scheduling period of the associated task

getDeadline

public java.util.Date getDeadline()
Specified by:
getDeadline in interface Workload
Returns:
the deadline by which the workload has to be run

getTaskSpecification

public TaskSpecification getTaskSpecification()
Specified by:
getTaskSpecification in interface Workload
Returns:
the specification of the task to which the workload belongs

getWorkload

public int getWorkload(int j)
Description copied from interface: Workload
Getter for the workload associated with a given task hour of the task

Specified by:
getWorkload in interface Workload
Parameters:
j - the task hour to get the load for
Returns:
the load corresponding to the given task hour

compareTo

public int compareTo(Workload wl)
Specified by:
compareTo in interface java.lang.Comparable<Workload>