Package com.datasquad.task
Class TaskStorage
- java.lang.Object
-
- com.datasquad.task.TaskStorage
-
- All Implemented Interfaces:
java.io.Serializable
public class TaskStorage extends java.lang.Object implements java.io.SerializableThis class is used in order to save all the tasks in the memory. Also, this class manage all the different types available.- Author:
- CADOUL Michael AND VERY-GRIETTE Milan
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaskStorage()Basically sets the default types of tasks directly in the constructor
-
Method Summary
Modifier and Type Method Description (package private) voidaddTask(Task task)Used to add a task(package private) java.util.Vector<Task>getmStorage()Getter(package private) java.util.List<java.lang.String>getmTypes()Getter(package private) java.util.Vector<java.lang.String>getTitleArray()Kind of getter(package private) voidremove(int index)Used to remove a specific taskjava.lang.StringtoString()Override the toString function in order to show all the stored tasks
-
-
-
Field Detail
-
mStorage
private java.util.Vector<Task> mStorage
-
mTypes
private java.util.List<java.lang.String> mTypes
Vector array, where all the tasks are saved
-
-
Method Detail
-
getTitleArray
java.util.Vector<java.lang.String> getTitleArray()
Kind of getter- Returns:
- a generated array with all the Task's title.
-
toString
public java.lang.String toString()
Override the toString function in order to show all the stored tasks- Overrides:
toStringin classjava.lang.Object- Returns:
- String value
-
addTask
void addTask(Task task)
Used to add a task- Parameters:
task- The task we want to add
-
getmStorage
java.util.Vector<Task> getmStorage()
Getter- Returns:
- The Tasks vector
-
getmTypes
java.util.List<java.lang.String> getmTypes()
Getter- Returns:
- The List of types
-
remove
void remove(int index)
Used to remove a specific task- Parameters:
index- The index of the task we want to remove
-
-