本文整理汇总了Java中org.cpsolver.studentsct.model.Course.getCredit方法的典型用法代码示例。如果您正苦于以下问题:Java Course.getCredit方法的具体用法?Java Course.getCredit怎么用?Java Course.getCredit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cpsolver.studentsct.model.Course
的用法示例。
在下文中一共展示了Course.getCredit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: XSubpart
import org.cpsolver.studentsct.model.Course; //导入方法依赖的package包/类
public XSubpart(Subpart subpart, boolean courseCredit) {
iUniqueId = subpart.getId();
iInstructionalType = subpart.getInstructionalType();
iAllowOverlap = subpart.isAllowOverlap();
iName = subpart.getName();
iConfigId = subpart.getConfig().getId();
iParentId = (subpart.getParent() == null ? null : subpart.getParent().getId());
if (subpart.getCredit() != null)
iCredit = new XCredit(subpart.getCredit());
if (courseCredit) {
for (Course course: subpart.getConfig().getOffering().getCourses()) {
if (course.getCredit() != null)
iCreditByCourse.put(course.getId(), new XCredit(course.getCredit()));
}
}
for (Section section: subpart.getSections())
iSections.add(new XSection(section));
}
示例2: XConfig
import org.cpsolver.studentsct.model.Course; //导入方法依赖的package包/类
public XConfig(Config config) {
iUniqueId = config.getId();
iName = config.getName();
iOfferingId = config.getOffering().getId();
iLimit = config.getLimit();
boolean credit = false;
for (Course course: config.getOffering().getCourses()) {
if (course.getCredit() != null) { credit = true; break; }
}
for (Subpart subpart: config.getSubparts()) {
iSubparts.add(new XSubpart(subpart, credit));
credit = false;
}
if (config.getInstructionalMethodId() != null)
iInstructionalMethod = new XInstructionalMethod(config.getInstructionalMethodId(), config.getInstructionalMethodName());
}
示例3: XCourse
import org.cpsolver.studentsct.model.Course; //导入方法依赖的package包/类
public XCourse(Course course) {
super(course);
iSubjectArea = course.getSubjectArea();
iCourseNumber = course.getCourseNumber();
iNote = course.getNote();
iLimit = course.getLimit();
iProjected = course.getProjected();
if (course.getCredit() != null)
iCredit = new XCredit(course.getCredit());
iControl = course.getName().equals(course.getOffering().getName());
}
示例4: saveCourse
import org.cpsolver.studentsct.model.Course; //导入方法依赖的package包/类
/**
* Save given course
* @param courseEl course element to be populated
* @param course course to be saved
*/
protected void saveCourse(Element courseEl, Course course) {
courseEl.addAttribute("id", getId("course", course.getId()));
if (iShowNames)
courseEl.addAttribute("subjectArea", course.getSubjectArea());
if (iShowNames)
courseEl.addAttribute("courseNbr", course.getCourseNumber());
if (iShowNames && course.getLimit() >= 0)
courseEl.addAttribute("limit", String.valueOf(course.getLimit()));
if (iShowNames && course.getProjected() != 0)
courseEl.addAttribute("projected", String.valueOf(course.getProjected()));
if (iShowNames && course.getCredit() != null)
courseEl.addAttribute("credit", course.getCredit());
}