package tars.model.task;

/**
 * Represents a Task's priority in tars.
 */
public class Priority {

}

@@ -19,16 +19,71 @@
 .task;%0A%0A
+import tars.commons.exceptions.IllegalValueException;%0A%0A
 /**%0A * R
@@ -147,11 +147,1111 @@
 ority %7B%0A
+    public static final String MESSAGE_PRIORITY_CONSTRAINTS = %22Task priority should be h / m / l%22;%0A    public static final String PRIORITY_VALIDATION_REGEX = %22%5B%5C%5Cp%7BLower%7D %5D+%22;%0A    %0A    private String priorityLevel;%0A    %0A    /**%0A     * Validates given task priority level.%0A     *%0A     * @throws IllegalValueException if given priority level string is invalid.%0A     */%0A    public Priority(String priorityLevel) throws IllegalValueException %7B%0A        assert priorityLevel != null;%0A        priorityLevel = priorityLevel.trim();%0A        if (!isValidPriorityLevel(priorityLevel)) %7B%0A            throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);%0A        %7D%0A        this.priorityLevel = priorityLevel;%0A    %7D%0A    %0A    /**%0A     * Returns true if a given string is a valid task priority level.%0A     */%0A    public static boolean isValidPriorityLevel(String level) %7B%0A        return level.matches(PRIORITY_VALIDATION_REGEX);%0A    %7D%0A%0A    public String getLevel() %7B%0A        return priorityLevel;%0A    %7D%0A%0A    public void setLevel(String priorityLevel) %7B%0A        this.priorityLevel = priorityLevel;%0A    %7D%0A    
 %0A%7D%0A

Add new model Priority