Model . Task - SeanSpires/Project1-306-Team-Stonks GitHub Wiki
This is the class for Task objects.
Fields
- nodeNumber - Number that identifies the node.
- weight - How long it takes to for the task to complete.
- Processor - The processor that the task is currently running on.
List
- parentTask - List of parent tasks.
HashMap
- 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. |