Package task
Class Task
java.lang.Object
task.Task
public class Task
extends java.lang.Object
The Task class which ensure the structure of a task which contains a
description and is related to a unique ID.
- Author:
- Melvin Campos Casares
-
Constructor Summary
Constructors Constructor Description Task(java.lang.String description) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetDescription()Get the description of the taskintgetId()Get the ID of the taskinthashCode()java.lang.StringtoString()
-
Constructor Details
-
Task
public Task(java.lang.String description)
-
-
Method Details
-
getId
public int getId()Get the ID of the task- Returns:
- the ID (int) of the task
-
getDescription
public java.lang.String getDescription()Get the description of the task- Returns:
- the description (String) of the task
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-