Class SchoolYear

All Implemented Interfaces:
IPeriod, ILightObject, Serializable

public class SchoolYear extends Period
Since:
1.0 Oct 12, 2008
Author:
Steph GAUDRY
See Also:
Serialized Form
  • Constructor Details

    • SchoolYear

      public SchoolYear(int id, Date startDate, Date endDate)
      Parameters:
      id -
      startDate -
      endDate -
  • Method Details

    • getPeriods

      public List<Period> getPeriods()
      Returns:
      the periods
    • setPeriods

      public void setPeriods(List<Period> periods)
      Sets unsafe the periods for a year. No validity check done on periods starting before the year start date or ending after the year end date.
      Parameters:
      periods - the periods to set
    • checkPeriods

      public void checkPeriods() throws OutOfBoundException, NullPointerException
      Checks if the periods are into this year.
      Throws:
      OutOfBoundException - if at least a period is out of this year bounds
      NullPointerException - if the periods collection has not been initialized
    • toString

      public String toString()
      String representation in YYYY-YYYY format
      Overrides:
      toString in class Period
      Returns:
      a String representation of this LightObject only for debugging
      See Also:
      Period.getIntervalString()