Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Course

the model of a Course that has multiple sections. A Course object may have all or a subset of the sections, depending on the array of section indices passed to its constructor.

All course instances are immutable

Hierarchy

  • Course

Implements

Index

Constructors

constructor

  • this constructor is only used to create a copy of a course with all or a selected subset of sections. Original course instances are created through Object.create and are not constructed by this constructor.

    Parameters

    • course: Course

      the full-course that will be copied

    • ids: number[]

      A list of section indices for specifying the subset of sections contained in this course

    Returns Course

Properties

Readonly department

department: string

Readonly description

description: string

Readonly ids

ids: number[]

A list of section indices for specifying the subset of sections contained in this course

Readonly key

key: string

Readonly number

number: number

Readonly sections

sections: Section[]

Array of sections contained in this object. Can be all sections or a subset or the sections. This property is non-enumerable

Readonly title

title: string

Readonly type

Readonly units

units: string

Accessors

displayName

  • get displayName(): string

displayNameNoType

  • get displayNameNoType(): string

Methods

allSameTime

  • allSameTime(): boolean

equals

  • equals(object: object): boolean

getCombined

  • getCombined(): {}
  • Get an object in which the key is the date string + days and value is the array of section contained in this Course occurring at that time. For example:

    {"08/27/2019 - 12/17/2019|MoTu 11:00AM-11:50AM|Fr 10:00AM - 10:50AM" : [...Sections]}
    

    Returns {}

getCourse

  • getCourse(ids: number[]): Course

getSectionById

  • getSectionById(id: number): Section

has

hash

  • hash(): number

Generated using TypeDoc