IEnrolment enrollment = (IEnrolment) enrolledEnrollments.get(i);
IEnrollment enrollment = (IEnrollment) enrolledEnrollments.get(i);
    public List apply(List curricularCoursesToBeEnrolledIn) {        int totalNAC = 0;        List filtercurricularCoursesToBeEnrolledIn = new ArrayList();        for(int i = 0; i < enrolledEnrollments.size(); i++) {            IEnrolment enrollment = (IEnrolment) enrolledEnrollments.get(i);            ICurricularCourse curricularCourse = enrollment.getCurricularCourse();            totalNAC += getIncrementNAC(curricularCourse).intValue();        }        availableNACToEnroll = maxTotalNAC - totalNAC;                curricularCoursesToBeEnrolledIn = sortCurricularCourseByCurricularYear(curricularCoursesToBeEnrolledIn);        curricularCoursesToBeEnrolledIn = filterCurricularCoursesThatExeceedAcumulatedValue(curricularCoursesToBeEnrolledIn);                for(int i = 0; i < curricularCoursesToBeEnrolledIn.size(); i++){            ICurricularCourse curricularCourse = (ICurricularCourse) curricularCoursesToBeEnrolledIn.get(i);            if(availableNACToEnroll < getIncrementNAC(curricularCourse).intValue())                filtercurricularCoursesToBeEnrolledIn.add(curricularCourse);         }                curricularCoursesToBeEnrolledIn.removeAll(filtercurricularCoursesToBeEnrolledIn);        return curricularCoursesToBeEnrolledIn;    }