private Collection buildAvailableRemainingCourses(final Student student) {  Collection allCourses = student.getActiveStudentCurricularPlan().getDegreeCurricularPlan().getCurricularCourses(); Collection available = CollectionUtils.select(allCourses, new Predicate() { public boolean evaluate(Object arg0) { boolean availableToEnroll = true; boolean atLeastOnOpenScope = false; CurricularCourse course = (CurricularCourse) arg0; for (CurricularCourseScope scope : course.getScopes()) { atLeastOnOpenScope |= scope.isActive().booleanValue(); }  for (StudentCurricularPlan plan : student.getStudentCurricularPlans()) { availableToEnroll &= plan.isCurricularCourseApproved(course); }  availableToEnroll &= atLeastOnOpenScope; return availableToEnroll; } }  );  Collection availableInfos = CollectionUtils.collect(available, new Transformer() { public Object transform(Object arg0) { CurricularCourse course = (CurricularCourse) arg0; InfoExternalCurricularCourseInfo info = InfoExternalCurricularCourseInfo.newFromDomain(course); return info;  } }  );
private Collection buildAvailableRemainingCourses(final Student student) { final Collection<CurricularCourse> allCourses = student.getActiveStudentCurricularPlan().getDegreeCurricularPlan().getCurricularCourses(); final Collection<InfoExternalCurricularCourseInfo> availableInfos = new ArrayList<InfoExternalCurricularCourseInfo>(); for (final CurricularCourse curricularCourse : allCourses) { if (hasActiveScope(curricularCourse) && studentIsNotApprovedInCurricularCourse(student, curricularCourse)) { final InfoExternalCurricularCourseInfo infoExternalCurricularCourseInfo = InfoExternalCurricularCourseInfo.newFromDomain(curricularCourse); availableInfos.add(infoExternalCurricularCourseInfo); } }
	private Collection buildAvailableRemainingCourses(final Student student)	{		Collection allCourses = student.getActiveStudentCurricularPlan().getDegreeCurricularPlan().getCurricularCourses();		Collection available = CollectionUtils.select(allCourses, new Predicate()		{			public boolean evaluate(Object arg0)			{				boolean availableToEnroll = true;				boolean atLeastOnOpenScope = false;				CurricularCourse course = (CurricularCourse) arg0;				for (CurricularCourseScope scope : course.getScopes())				{					atLeastOnOpenScope |= scope.isActive().booleanValue();				}				for (StudentCurricularPlan plan : student.getStudentCurricularPlans())				{					availableToEnroll &= plan.isCurricularCourseApproved(course);				}				availableToEnroll &= atLeastOnOpenScope;				return availableToEnroll;			}		}		);		Collection availableInfos = CollectionUtils.collect(available, new Transformer()		{			public Object transform(Object arg0)			{				CurricularCourse course = (CurricularCourse) arg0;				InfoExternalCurricularCourseInfo info = InfoExternalCurricularCourseInfo.newFromDomain(course);				return info;			}		}		);		return availableInfos;	}