public class Choice extends Object
Constructor and Description |
---|
Choice(Config config)
Constructor
|
Choice(Offering offering,
String choiceId)
Constructor
|
Choice(Offering offering,
String instructionalType,
TimeLocation time,
List<Instructor> instructors)
Constructor
|
Choice(Offering offering,
String instructionalType,
TimeLocation time,
String instructorIds,
String instructorNames)
Deprecated.
|
Choice(Section section)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compare two choices, based on
getId() |
Long |
getConfigId()
config id
|
String |
getId()
Choice id combined from instructionalType, time and instructorIds in the
following format: instructionalType|time|instructorIds where time is of
format dayCode:startSlot:length:datePatternId
|
String |
getInstructionalType()
Instructional type (e.g., Lecture, Recitation or Laboratory) to which
this choice belongs
|
String |
getInstructorIds()
Deprecated.
|
String |
getInstructorNames()
Deprecated.
|
String |
getInstructorNames(String delim)
Instructor names
|
List<Instructor> |
getInstructors()
Instructors of this choice
|
String |
getName()
Choice name: name of the appropriate subpart + long name of time +
instructor(s) name
|
Offering |
getOffering()
Instructional offering to which this choice belongs
|
Set<Section> |
getParentSections()
List of parent sections of sections of the instructional offering which
represent this choice.
|
Long |
getSectionId()
section id
|
Set<Section> |
getSections()
List of sections of the instructional offering which represent this
choice.
|
Long |
getSubpartId()
subpart id
|
TimeLocation |
getTime()
Time location of the choice
|
int |
hashCode()
Choice hash id, based on
getId() |
boolean |
hasInstructors()
Has any instructors
|
boolean |
isMatching(Section section)
True if this choice is applicable to the given section (that is, the choice is a config choice or with the same subpart / instructional type)
|
int |
nrInstructors()
Return number of instructors of this choice
|
boolean |
sameChoice(Section section)
True if the time assignment as well as the instructor(s) are the same
|
boolean |
sameConfiguration(Enrollment enrollment)
True if the configuration is the very same
|
boolean |
sameConfiguration(Section section)
True if the configuration is the very same
|
boolean |
sameInstructionalType(Section section)
True if the instructional type is the same
|
boolean |
sameInstructors(Section section)
True if the section contains all instructors of this choice
|
boolean |
sameOffering(Section section)
True if the offering is the same
|
boolean |
sameSection(Enrollment enrollment)
True if the configuration is the very same
|
boolean |
sameSection(Section section)
True if the section is the very same
|
boolean |
sameSubart(Section section)
True if the subpart is the very same
|
boolean |
sameTime(Choice choice)
Return true if the given choice has the same instructional type and time
return true if the two choices have the same time
|
boolean |
sameTime(Section section)
True if the time assignment is the same
|
String |
toString() |
public Choice(Offering offering, String instructionalType, TimeLocation time, List<Instructor> instructors)
offering
- instructional offering to which the choice belongsinstructionalType
- instructional type to which the choice belongs (e.g., Lecture,
Recitation or Laboratory)time
- time assignmentinstructors
- instructor(s)@Deprecated public Choice(Offering offering, String instructionalType, TimeLocation time, String instructorIds, String instructorNames)
public Choice(Section section)
section
- section to base the choice onpublic Choice(Config config)
config
- configuration to base the choice onpublic Offering getOffering()
public String getInstructionalType()
public TimeLocation getTime()
public boolean sameTime(Choice choice)
@Deprecated public String getInstructorIds()
@Deprecated public String getInstructorNames()
public String getInstructorNames(String delim)
delim
- delimiterpublic String getId()
public Set<Section> getSections()
public Set<Section> getParentSections()
public String getName()
public boolean sameInstructionalType(Section section)
public boolean sameInstructors(Section section)
public boolean sameOffering(Section section)
public boolean sameChoice(Section section)
public boolean sameSection(Section section)
public boolean sameSubart(Section section)
public boolean sameConfiguration(Section section)
public boolean sameConfiguration(Enrollment enrollment)
public boolean sameSection(Enrollment enrollment)
public boolean isMatching(Section section)
public Long getSectionId()
public Long getSubpartId()
public Long getConfigId()
public List<Instructor> getInstructors()
public boolean hasInstructors()
public int nrInstructors()