private NeedsAssessmentComponentScoreVo getComponentScoreByType(NeedsAssessmentComponentScoreVoCollection scores, UserDefinedAssessmentType assessmentType) { if(scores == null || assessmentType == null) return null; for (int i = 0; i < scores.size(); i++) { if(assessmentType.equals(scores.get(i).getComponentType())) return scores.get(i); } return null; }