package seedu.taskitty.commons.util;

import seedu.taskitty.model.task.Task;

/**
 * Helper functions for handling tasks.
 *
 */
public class TaskUtil {
    
    /**
     * Returns the specified index in the {@code command} IF a valid category character was given.
     *   else return the default index
     */
    public static int getCategoryIndex(String command) {
        switch(command) {
        
            case(Task.TODO_CATEGORY_CHAR) :
                return Task.TODO_CATEGORY_INDEX;
            
            case(Task.DEADLINE_CATEGORY_CHAR): 
                return Task.DEADLINE_CATEGORY_INDEX;
            
            case(Task.EVENT_CATEGORY_CHAR): 
                return Task.EVENT_CATEGORY_INDEX;
            
            default: 
                return Task.DEFAULT_CATEGORY_INDEX;
            
        }
    }
    
}

@@ -113,16 +113,30 @@
 ng tasks
+ related items
 .%0A *%0A */
@@ -366,22 +366,23 @@
 String c
-ommand
+ategory
 ) %7B%0A    
@@ -393,22 +393,23 @@
 switch(c
-ommand
+ategory
 ) %7B%0A    

Update comments and rename variables in TaskUtil