Exemple #1
0
  /**
   * Method setSeconds
   *
   * @param s
   */
  public void setSeconds(int s) {
    if (s < 0) {
      throw new IllegalArgumentException("Second value out of range");
    }

    checkNonWeeksOkay(s);

    seconds = s;

    normalize();
  }
Exemple #2
0
  /**
   * Method setHours
   *
   * @param h
   */
  public void setHours(int h) {
    if (h < 0) {
      throw new IllegalArgumentException("Hour value out of range");
    }

    checkNonWeeksOkay(h);

    hours = h;

    normalize();
  }
Exemple #3
0
  /**
   * Method setMinutes
   *
   * @param m
   */
  public void setMinutes(int m) {
    if (m < 0) {
      throw new IllegalArgumentException("Minute value out of range");
    }

    checkNonWeeksOkay(m);

    minutes = m;

    normalize();
  }
Exemple #4
0
  /**
   * Method setDays
   *
   * @param d
   */
  public void setDays(int d) {
    if (d < 0) {
      throw new IllegalArgumentException("Day value out of range");
    }

    checkNonWeeksOkay(d);

    days = d;

    normalize();
  }