protected Duration getDuration(int weeks, int days, int hours, int minutes, int seconds) {

    Duration duration = new Duration(days, hours, minutes, seconds);

    duration.setWeeks(weeks);

    return duration;
  }
Example #2
0
  /**
   * Method clone
   *
   * @return Object
   */
  public Object clone() {
    try {
      Duration other = (Duration) super.clone();

      other.weeks = weeks;
      other.days = days;
      other.hours = hours;
      other.minutes = minutes;
      other.seconds = seconds;

      return other;
    } catch (CloneNotSupportedException e) {
      throw new InternalError();
    }
  }