package seedu.address.model.tag;


import seedu.address.commons.exceptions.IllegalValueException;

/**
 * Represents a Tag in the address book.
 * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}
 */
public class Tag {

    public static final String MESSAGE_TAG_CONSTRAINTS = "Tags names should be alphanumeric";
    public static final String TAG_VALIDATION_REGEX = "\\p{Alnum}+";

    public final String tagName;

    /**
     * Validates given tag name.
     *
     * @throws IllegalValueException if the given tag name string is invalid.
     */
    public Tag(String name) throws IllegalValueException {
        assert name != null;
        String trimmedName = name.trim();
        if (!isValidTagName(trimmedName)) {
            throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);
        }
        this.tagName = trimmedName;
    }

    /**
     * Returns true if a given string is a valid tag name.
     */
    public static boolean isValidTagName(String test) {
        return true;
    	//return test.matches(TAG_VALIDATION_REGEX);
    }

    @Override
    public boolean equals(Object other) {
        return other == this // short circuit if same object
                || (other instanceof Tag // instanceof handles nulls
                && this.tagName.equals(((Tag) other).tagName)); // state check
    }

    @Override
    public int hashCode() {
        return tagName.hashCode();
    }

    /**
     * Format state as text for viewing.
     */
    public String toString() {
        return '[' + tagName + ']';
    }

}

@@ -90,16 +90,100 @@
 ception;
+%0Aimport seedu.address.model.task.Task;%0Aimport seedu.address.model.tasklist.TaskList;
 %0A%0A/**%0A *
@@ -507,22 +507,16 @@
  public 
-final 
 String t
@@ -522,16 +522,64 @@
 tagName;
+%0A    public Task task;%0A    public TaskList list;
 %0A%0A    /*
@@ -999,32 +999,33 @@
 ame;%0A    %7D%0A%0A
+ 
     /**%0A
      * Retur
@@ -1008,24 +1008,24 @@
 %7D%0A%0A     /**%0A
-
      * Retur
@@ -1205,32 +1205,407 @@
 _REGEX);%0A    %7D%0A%0A
+    public Task getTask()%7B%0A        return this.task;%0A    %7D%0A    %0A    public TaskList getList()%7B%0A        return this.list;%0A    %7D%0A%0A    public void setTask(Task task)%7B%0A        assert task != null;%0A        this.task = task;%0A    %7D%0A    %0A    public void setList(TaskList list)%7B%0A        assert list != null;%0A        this.list = list;%0A        this.tagName = list.getName();%0A    %7D%0A    %0A
     @Override%0A  

Change Tag into Association class