package seedu.emeraldo.model.task;

import seedu.emeraldo.commons.util.CollectionUtil;
import seedu.emeraldo.model.tag.UniqueTagList;

import java.util.Objects;

/**
 * Represents a Person in the address book.
 * Guarantees: details are present and not null, field values are validated.
 */
public class Task implements ReadOnlyTask {

    private Description Description;
    private Phone phone;
    private Address address;

    private UniqueTagList tags;

    /**
     * Every field must be present and not null.
     */
    public Task(Description Description, Phone phone, Address address, UniqueTagList tags) {
        assert !CollectionUtil.isAnyNull(Description, phone, address, tags);
        this.Description = Description;
        this.phone = phone;
        this.address = address;
        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list
    }

    /**
     * Copy constructor.
     */
    public Task(ReadOnlyTask source) {
        this(source.getDescription(), source.getPhone(), source.getAddress(), source.getTags());
    }

    @Override
    public Description getDescription() {
        return Description;
    }

    @Override
    public Phone getPhone() {
        return phone;
    }

    @Override
    public Address getAddress() {
        return address;
    }

    @Override
    public UniqueTagList getTags() {
        return new UniqueTagList(tags);
    }

    /**
     * Replaces this person's tags with the tags in the argument tag list.
     */
    public void setTags(UniqueTagList replacement) {
        tags.setTags(replacement);
    }

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

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

    @Override
    public String toString() {
        return getAsText();
    }

}

@@ -403,31 +403,33 @@
 private 
-Address address
+DateTime dateTime
 ;%0A%0A    p
@@ -575,23 +575,24 @@
  phone, 
-Address
+DateTime
  address
@@ -773,23 +773,24 @@
    this.
-address
+dateTime
  = addre
@@ -1046,23 +1046,24 @@
 urce.get
-Address
+DateTime
 (), sour
@@ -1277,26 +1277,28 @@
 lic 
-Address getAddress
+DateTime getDateTime
 () %7B
@@ -1313,23 +1313,24 @@
  return 
-address
+dateTime
 ;%0A    %7D%0A
@@ -2046,39 +2046,40 @@
 ription, phone, 
-address
+dateTime
 , tags);%0A    %7D%0A%0A

Change Address to DateTime