src/main/java/com/danielezihe/controllers/ToDoController.java
/**
     * Updates a Todo Id, Title & Description Properties
     * @param todoId The id of the Todo to be updated
     * @param data The Data to be saved
     * @param property The property of the Todo that would be updated
     */
Updates a Todo Id, Title & Description Properties
@param todoId The id of the Todo to be updated
@param data The Data to be saved
@param property The property of the Todo that would be updated
Updates a Todo Id Title & Description Properties @param todoId The id of the Todo to be updated @param data The Data to be saved @param property The property of the Todo that would be updated
public void updateTodo(int todoId, String data, TodoEntityProperties property) {
        ToDoEntity todo = deleteTodo(todoId);
        if(todo == null)
            throw new UnsupportedOperationException("Todo with id '" + todoId + "' not found");
        switch (property) {
            case TITLE -> todo.setTitle(data);
            case DESCRIPTION -> todo.setDescription(data);
        }
        todos.put(todoId, todo);
    }
public void updateTodo ( int todoId , String data , TodoEntityProperties property ) { ToDoEntity todo = deleteTodo ( todoId ) ; if ( todo == null ) throw new UnsupportedOperationException ( "Todo with id '" + todoId + "' not found" ) ; switch ( property ) { case TITLE -> todo . setTitle ( data ) ; case DESCRIPTION -> todo . setDescription ( data ) ; } todos . put ( todoId , todo ) ; }
Updates a Todo Id, Title & Description Properties
 @param todoId The id of the Todo to be updated
 @param data The Data to be saved
 @param property The property of the Todo that would be updated
Updates a Todo Id Title & Description Properties @param todoId The id of the Todo to be updated @param data The Data to be saved @param property The property of the Todo that would be updated