package tars.model.task.rsv;

import java.util.Objects;
import java.util.Set;

import tars.commons.util.CollectionUtil;
import tars.model.task.DateTime;
import tars.model.task.Name;
import tars.model.task.Priority;
import tars.model.task.Task;

/**
 * A task that has unconfirmed, reserved dates.
 * 
 * @@author A0124333U
 */

public class RsvTask extends Task {
    private Set<DateTime> dateTimeSet;
    private Set<String> tempTagSet;
    
    public RsvTask(Name name, Set<DateTime> dateTimeSet, Priority priority, Set<String> tempTagSet) {
        assert !CollectionUtil.isAnyNull(name, dateTimeSet, priority, tempTagSet);
        
        this.name = name;
        this.dateTimeSet = dateTimeSet;
        this.priority = priority;
        this.tempTagSet = tempTagSet;
    }
    
    /*
     * Accessors
     * Note: Accessor methods for the other attributes can be found in parent class, Task.java
     */

    public Set<DateTime> getDateTimeSet() {
        return dateTimeSet;
    }
    
    public Set<String> getTempTagSet() {
        return tempTagSet;
    }
    
    /*
     * Mutators
     * Note: Mutators methods for the other attributes can be found in parent class, Task.java
     */
      
    public void setDateTimeSet(Set<DateTime> dateTimeSet) {
        this.dateTimeSet = dateTimeSet;
    }
    
    public void setTempTagSet(Set<String> tempTagSet) {
        this.tempTagSet = tempTagSet;
    }
    
    @Override
    public int hashCode() {
        // use this method for custom fields hashing instead of implementing your own
        return Objects.hash(name, dateTimeSet);
    }   
    
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
        builder.append(getName())
                .append(" DateTime: ")
                .append(getDateTimeSet().toString())
                .append(" Priority: ")
                .append(priorityString())
                .append(" Tags: ")
                .append(getTempTagSet().toString());
        
        return builder.toString();
    }

}


@@ -179,41 +179,8 @@
 me;%0A
-import tars.model.task.Priority;%0A
 impo
@@ -324,16 +324,44 @@
  Task %7B%0A
+    %0A    private Name name;%0A
     priv
@@ -395,44 +395,8 @@
 et;%0A
-    private Set%3CString%3E tempTagSet;%0A
     
@@ -455,51 +455,8 @@
 eSet
-, Priority priority, Set%3CString%3E tempTagSet
 ) %7B%0A
@@ -517,30 +517,8 @@
 eSet
-, priority, tempTagSet
 );%0A 
@@ -595,218 +595,56 @@
 et;%0A
-        this.priority = priority;%0A        this.tempTagSet = tempTagSet;%0A    %7D%0A    %0A    /*%0A     * Accessors%0A     * Note: Accessor methods for the other attributes can be found in parent class, Task.java%0A 
+%0A    %7D%0A    %0A    /*%0A     * Accessors%0A     */%0A
     
-*/%0A
 %0A   
@@ -655,36 +655,20 @@
 lic 
-Set%3CDateTi
+Na
 me
-%3E
  get
-DateTimeSet
+Name
 () %7B
@@ -683,27 +683,20 @@
  return 
-dateTimeSet
+name
 ;%0A    %7D%0A
@@ -719,26 +719,29 @@
 Set%3C
-String%3E getTempTag
+DateTime%3E getDateTime
 Set(
@@ -759,23 +759,24 @@
  return 
-tempTag
+dateTime
 Set;%0A   
@@ -775,32 +775,37 @@
 Set;%0A    %7D%0A    %0A
+    %0A
     /*%0A     * Mu
@@ -821,107 +821,86 @@
    *
- Note: Mutators methods for the other attributes can be found in parent class, Task.java%0A     */%0A  
+/%0A      %0A    public void setName(Name name) %7B%0A        this.name = name;%0A    %7D%0A
     
@@ -1015,108 +1015,8 @@
    %0A
-    public void setTempTagSet(Set%3CString%3E tempTagSet) %7B%0A        this.tempTagSet = tempTagSet;%0A    %7D%0A
     
@@ -1439,176 +1439,8 @@
 g())
-%0A                .append(%22 Priority: %22)%0A                .append(priorityString())%0A                .append(%22 Tags: %22)%0A                .append(getTempTagSet().toString())
 ;%0A  

Remove priority and tag attributes from RsvTask