public class Subpart extends Object implements Comparable<Subpart>
Constructor and Description |
---|
Subpart(long id,
String itype,
String name,
Config config,
Subpart parent)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearReservationCache()
Clear reservation information that was cached on this subpart or below
|
int |
compareTo(Subpart s)
Compare two subparts: put parents first, use ids if there is no
parent-child relation
|
boolean |
equals(Object o) |
List<Subpart> |
getChildren()
Return children subparts
|
Set<Choice> |
getChoices()
List of available choices of the sections of this subpart.
|
Config |
getConfig()
Instructional offering configuration to which this subpart belongs
|
String |
getCredit()
Get credit (Online Student Scheduling only)
|
Float |
getCreditValue()
Get subpart's credit value (null if not set)
return subpart's credit value
|
long |
getId()
Subpart id
|
String |
getInstructionalType()
Instructional type, e.g., Lecture, Recitation or Laboratory
|
int |
getLimit()
Sum of the section limits (unlimited, if one or more sections are unlimited)
|
double |
getMaxPenalty()
Maximal penalty from
Section.getPenalty() |
double |
getMinPenalty()
Minimal penalty from
Section.getPenalty() |
String |
getName()
Subpart name
|
Subpart |
getParent()
Parent subpart, if parent-child relation is defined between subparts
|
List<Reservation> |
getSectionReservations()
Get reservations that require sections of this subpart
|
List<Section> |
getSections()
List of sections
|
boolean |
hasCreditValue()
True if this subpart has a credit value defined
|
int |
hashCode() |
boolean |
hasTime() |
boolean |
isAllowOverlap()
Return true if overlaps are allowed, but the number of overlapping slots should be minimized.
|
boolean |
isOnline() |
boolean |
isParentOf(Subpart subpart)
True, if this subpart is parent (or parent of a parent etc.) of the given
subpart
|
boolean |
isPast() |
void |
setAllowOverlap(boolean allowOverlap)
Set to true if overlaps are allowed, but the number of overlapping slots should be minimized (defaults to false).
|
void |
setCredit(String credit)
Set credit (Online Student Scheduling only)
|
void |
setCreditValue(Float creditValue)
Set subpart's credit value (null if not set)
|
String |
toString() |
public Subpart(long id, String itype, String name, Config config, Subpart parent)
id
- scheduling subpart unique iditype
- instructional typename
- subpart nameconfig
- instructional offering configuration to which this subpart
belongsparent
- parent subpart, if parent-child relation is defined between
subpartspublic long getId()
public String getInstructionalType()
public Config getConfig()
public List<Section> getSections()
public Subpart getParent()
public boolean isParentOf(Subpart subpart)
subpart
- parent scheduling subpartpublic int compareTo(Subpart s)
compareTo
in interface Comparable<Subpart>
public Set<Choice> getChoices()
public double getMinPenalty()
Section.getPenalty()
public double getMaxPenalty()
Section.getPenalty()
public List<Subpart> getChildren()
public boolean isAllowOverlap()
public void setAllowOverlap(boolean allowOverlap)
allowOverlap
- are overlaps of classes of this scheduling subpart allowedpublic List<Reservation> getSectionReservations()
public void clearReservationCache()
public int getLimit()
public void setCredit(String credit)
credit
- scheduling subpart creditpublic String getCredit()
public boolean hasCreditValue()
public void setCreditValue(Float creditValue)
creditValue
- subpart's credit valuepublic Float getCreditValue()
public boolean isOnline()
public boolean hasTime()
public boolean isPast()