package seedu.address.model.task;

import java.util.Objects;

import seedu.address.commons.util.CollectionUtil;

/**
 * Represents a Task in the address book.
 * Guarantees: Is a POJO. Details are present and not null. Field values are validated and immutable.
 */
public class Task {

    public final Name name;

    /**
     * Every field must be present and not null.
     */
    public Task(Name name) {
        assert !CollectionUtil.isAnyNull(name);
        this.name = name;
    }

    /**
     * Copy constructor.
     */
    public Task(Task source) {
        this(source.name);
    }

    @Override
    public boolean equals(Object other) {
        return other == this
               || (other instanceof Task
               && ((Task)other).name.equals(name));
    }

    @Override
    public int hashCode() {
        // use this method for custom fields hashing instead of implementing your own
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
        builder.append(name);
        return builder.toString();
    }

}

@@ -32,35 +32,8 @@
 k;%0A%0A
-import java.util.Objects;%0A%0A
 impo
@@ -78,16 +78,16 @@
 onUtil;%0A
+
 %0A/**%0A * 
@@ -238,16 +238,25 @@
 %0Apublic 
+abstract 
 class Ta
@@ -424,32 +424,32 @@
 sAnyNull(name);%0A
+
         this.nam
@@ -469,643 +469,6 @@
  %7D%0A%0A
-    /**%0A     * Copy constructor.%0A     */%0A    public Task(Task source) %7B%0A        this(source.name);%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object other) %7B%0A        return other == this%0A               %7C%7C (other instanceof Task%0A               && ((Task)other).name.equals(name));%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        // use this method for custom fields hashing instead of implementing your own%0A        return Objects.hash(name);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        final StringBuilder builder = new StringBuilder();%0A        builder.append(name);%0A        return builder.toString();%0A    %7D%0A%0A
 %7D%0A

make Task abstract