Class Primary

java.lang.Object
edu.ucsb.cs156.courses.documents.Primary

public class Primary extends Object
  • Constructor Details

    • Primary

      public Primary()
  • Method Details

    • fromConvertedSections

      public static List<Primary> fromConvertedSections(List<ConvertedSection> convertedSections)
      Convert a flat list of ConvertedSection objects into a list of Primary objects, where each Primary contains a primary section (e.g. a lecture) and its secondary sections (e.g. discussion sections) as subRows. The result is sorted by quarter descending, then by course id (a search may match several courses, e.g. 130A and 130B), then by section number ascending, so that secondary sections immediately follow their primary section.
      Parameters:
      convertedSections - a flat list of ConvertedSection objects
      Returns:
      a list of Primary objects