コード例 #1
0
  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;
  }
コード例 #2
0
ファイル: Duration.java プロジェクト: nykma/ykt4sungard
  /**
   * 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();
    }
  }