当前位置: 首页>>代码示例>>Java>>正文


Java Course.getCredit方法代码示例

本文整理汇总了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));
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:19,代码来源:XSubpart.java

示例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());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:17,代码来源:XConfig.java

示例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());
  }
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:XCourse.java

示例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());
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:19,代码来源:StudentSectioningXMLSaver.java


注:本文中的org.cpsolver.studentsct.model.Course.getCredit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。