|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.studentsct.model.Subpart
public class Subpart
Representation of a scheduling subpart. Each scheduling subpart contains id,
instructional type, name, instructional offering configuration, and a list of
sections. Optionally, parent-child relation between subparts can be defined.
Constructor Summary | |
---|---|
Subpart(long id,
String itype,
String name,
Config config,
Subpart parent)
Constructor |
Method Summary | |
---|---|
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) |
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 |
int |
hashCode()
|
boolean |
isAllowOverlap()
Return true if overlaps are allowed, but the number of overlapping slots should be minimized. |
boolean |
isParentOf(Subpart subpart)
True, if this subpart is parent (or parent of a parent etc.) of the given subpart |
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) |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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
subpartsMethod Detail |
---|
public long getId()
public String getInstructionalType()
public String getName()
public Config getConfig()
public List<Section> getSections()
public Subpart getParent()
public String toString()
toString
in class Object
public boolean isParentOf(Subpart subpart)
public 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)
public List<Reservation> getSectionReservations()
public void clearReservationCache()
public int getLimit()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setCredit(String credit)
public String getCredit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |