Model . Task - SeanSpires/Project1-306-Team-Stonks GitHub Wiki

Task Methods

This is the class for Task objects.

Fields

  1. nodeNumber - Number that identifies the node.
  2. weight - How long it takes to for the task to complete.
  3. Processor - The processor that the task is currently running on.

List

  1. parentTask - List of parent tasks.

HashMap

  1. subTask - Maps a Task and its respective weights together.
Method Purpose
int getNodeNumber() Returns the value of the nodeNumber field.
int getWeight() Returns the value of the weight field - gives the time it takes for the specific task to end.
void setWeight(int weight) Sets the weight field to the specified input value.
int getProcessor() Returns the processor field of the task.
void setProcessor(int processor) Sets the processor field to the specified input value.
List getParentTask() Returns the list of parent tasks from the parentTask list.
void setParentTasks(Task task) Adds the input Task to be the parent task, if it is not contained in the existing parentTask list.
HashMap<Task, Integer> getSubTask() Returns the HashMap subTasks.
void setSubTasks(Task task, Integer weight) Maps the weight to each unique Task from the inputs.
⚠️ **GitHub.com Fallback** ⚠️