package tars.model.task.rsv;

import java.util.ArrayList;
import java.util.Objects;
import tars.commons.util.CollectionUtil;
import tars.model.task.DateTime;
import tars.model.task.Name;
import tars.model.task.ReadOnlyTask;

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

public class RsvTask{
    
    private Name name;
    private ArrayList<DateTime> dateTimeList;
    
    public RsvTask(Name name, ArrayList<DateTime> dateTimeList) {
        assert !CollectionUtil.isAnyNull(name, dateTimeList);
        
        this.name = name;
        this.dateTimeList = dateTimeList;

    }
    
    /**
     * Copy constructor.
     */
    public RsvTask(RsvTask source) {
        this(source.getName(), source.getDateTimeList());
    }
    
    /*
     * Accessors
     */
    
    public Name getName() {
        return name;
    }
    
    public ArrayList<DateTime> getDateTimeList() {
        return dateTimeList;
    }
    
    
    /*
     * Mutators
     */
      
    public void setName(Name name) {
        this.name = name;
    }
    
    public void setDateTimeList(ArrayList<DateTime> dateTimeList) {
        this.dateTimeList = dateTimeList;
    }
    
    
    @Override
    public int hashCode() {
        // use this method for custom fields hashing instead of implementing your own
        return Objects.hash(name, dateTimeList);
    }   
    
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
        builder.append(getName())
                .append(" DateTime: ")
                .append(getDateTimeList().toString());
        
        return builder.toString();
    }

}
@@ -321,22 +321,19 @@
  RsvTask
+ 
 %7B%0A
-    
 %0A    pri
@@ -394,21 +394,17 @@
 meList;%0A
-    
 %0A
+
     publ
@@ -523,25 +523,17 @@
 eList);%0A
-        
 %0A
+
         
@@ -595,29 +595,25 @@
 ist;%0A%0A    %7D%0A
-    
 %0A
+
     /**%0A    
@@ -738,29 +738,25 @@
 t());%0A    %7D%0A
-    
 %0A
+
     /*%0A     
@@ -775,21 +775,17 @@
      */%0A
-    
 %0A
+
     publ
@@ -823,37 +823,33 @@
 urn name;%0A    %7D%0A
-    
 %0A
+
     public Array
@@ -914,34 +914,25 @@
 List;%0A    %7D%0A
-    %0A    
 %0A
+
     /*%0A     
@@ -950,23 +950,17 @@
      */%0A
-      
 %0A
+
     publ
@@ -1016,29 +1016,25 @@
 name;%0A    %7D%0A
-    
 %0A
+
     public v
@@ -1141,18 +1141,9 @@
   %7D%0A
-    %0A    
 %0A
+
     
@@ -1256,16 +1256,27 @@
 ementing
+%0A        //
  your ow
@@ -1331,24 +1331,17 @@
 );%0A    %7D
-   %0A    
+%0A
 %0A    @Ov
@@ -1470,33 +1470,16 @@
 tName())
-%0A                
 .append(
@@ -1496,25 +1496,8 @@
 : %22)
-%0A                
 .app
@@ -1531,24 +1531,25 @@
 ing());%0A
+%0A
         
 %0A       
@@ -1540,25 +1540,16 @@
         
-%0A        
 return b
@@ -1564,16 +1564,373 @@
 oString(
+);%0A    %7D%0A%0A    public boolean equals(Object other) %7B%0A        return other == this // short circuit if same object%0A                %7C%7C (other instanceof RsvTask // instanceof handles nulls%0A                        && ((RsvTask) other).getName().equals(this.getName())%0A                        && ((RsvTask) other).getDateTimeList().equals(this.getDateTimeList())
 );%0A    %7D

Add "equals" method in RsvTask