コード例 #1
0
 /**
  * return a clone
  *
  * @return a clone
  */
 public IntervalTimeFrame getClone() {
   IntervalTimeFrame clone =
       new FacilityAvailability(
           this.facilityKey,
           this.getBasePeriodOfTime().getCalendarStart(),
           this.getBasePeriodOfTime().getCalendarEnd());
   clone.setInterval(this.getInterval());
   return clone;
 }
コード例 #2
0
 /** {@inheritDoc} */
 @Override
 public FacilityAvailability clone() {
   try {
     FacilityAvailability result = (FacilityAvailability) super.clone();
     IntervalTimeFrame cloneditf = this.intervalTimeFrame.clone();
     cloneditf.setBasePeriodOfTime(cloneditf.getBasePeriodOfTime().clone());
     result.setIntervalTimeFrame(cloneditf);
     return result;
   } catch (CloneNotSupportedException e) {
     throw new Error("implements Cloneable!");
   }
 }