/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * Method setInterval * * @param millis */ public void setInterval(long millis) { if (millis < 0) { throw new IllegalArgumentException("Negative-length interval"); } clear(); days = (int) (millis / MILLIS_PER_DAY); seconds = (int) ((millis % MILLIS_PER_DAY) / MILLIS_PER_SECOND); normalize(); }