/** * Returns the second following this one. * * @return The second following this one. */ @Override public RegularTimePeriod next() { Second result = null; if (this.second != LAST_SECOND_IN_MINUTE) { result = new Second(this.second + 1, getMinute()); } else { Minute next = (Minute) getMinute().next(); if (next != null) { result = new Second(FIRST_SECOND_IN_MINUTE, next); } } return result; }
/** * Returns the second following this one. * * @return The second following this one. */ public RegularTimePeriod next() { Second result = null; if (this.second != LAST_SECOND_IN_MINUTE) { result = new Second(this.second + 1, getMinute()); } else { Minute next = (Minute) getMinute().next(); if (next != null) { result = new Second(FIRST_SECOND_IN_MINUTE, next); } } return result; }