Пример #1
0
 public Appointment getCopy() {
   Appointment a = new Appointment(this.leader);
   a.start = this.start;
   a.end = this.end;
   if (this.date != null) {
     a.date = new Date(this.date.getTime());
   }
   a.subject = this.subject;
   a.id = this.id;
   a.description = this.description;
   a.roomNumber = this.roomNumber;
   a.location = this.location;
   List<Participant> list = new ArrayList<Participant>(this.getParticipants().size());
   for (int i = 0; i < this.getParticipants().size(); i++) {
     list.add(
         new Participant(
             this.getParticipants().get(i).getEmployee(),
             this.getParticipants().get(i).getState()));
   }
   a.participants = list;
   return a;
 }