src/main/java/seedu/taskmanager/model/task/UniqueTaskList.java
/**
     * Finds the sorted position to add new task to the existing list of task.
     * List of tasks is sorted firstly based on type of task and then by
     * chronological order of the task
     *
     * Event tasks sorted by startDate startTime. Deadline tasks sorted by
     * endDate endTime. Floating tasks are just added to the bottom of the list
     * as there is no time element within a floating task.
     *
     * @return The sorted position index to add the new task in the sorted list
     *         of tasks.
     */
Finds the sorted position to add new task to the existing list of task.
List of tasks is sorted firstly based on type of task and then by
chronological order of the task

Event tasks sorted by startDate startTime. Deadline tasks sorted by
endDate endTime. Floating tasks are just added to the bottom of the list
as there is no time element within a floating task.

@return The sorted position index to add the new task in the sorted list
of tasks.
Finds the sorted position to add new task to the existing list of task . List of tasks is sorted firstly based on type of task and then by chronological order of the task Event tasks sorted by startDate startTime . Deadline tasks sorted by endDate endTime . Floating tasks are just added to the bottom of the list as there is no time element within a floating task . @return The sorted position index to add the new task in the sorted list of tasks .
private int findSortedPositionToAdd(Task toAdd) {
        int addIndex = 0;
        if (!internalList.isEmpty()) {
            if (toAdd.isEventTask()) {
                addIndex = findSortedPositionToAddEvents(toAdd);
            }
            if (toAdd.isDeadlineTask()) {
                addIndex = findSortedPositionToAddDeadlines(toAdd);
            }
            if (toAdd.isFloatingTask()) {
                addIndex = internalList.size();
            }
        }
        return addIndex;
    }
private int findSortedPositionToAdd ( Task toAdd ) { int addIndex = 0 ; if ( ! internalList . isEmpty ( ) ) { if ( toAdd . isEventTask ( ) ) { addIndex = findSortedPositionToAddEvents ( toAdd ) ; } if ( toAdd . isDeadlineTask ( ) ) { addIndex = findSortedPositionToAddDeadlines ( toAdd ) ; } if ( toAdd . isFloatingTask ( ) ) { addIndex = internalList . size ( ) ; } } return addIndex ; }
Finds the sorted position to add new task to the existing list of task.
Finds the sorted position to add new task to the existing list of task .