}
Application2Criteria[] application2criterias = applicationManager.getApplication2criteria(criteria);
for (Application2Criteria application2criteria : application2criterias) {
for (int applicationX = 0; applicationX < applications.length; applicationX++) {
ApplicationType application = applications[applicationX];
if (application == application2criteria.getApplication()){
applicationWeights[applicationX] += application2criteria.getWeight();
}
}
}
}
}
}
}
}
// Find the applications with the weight >= 0
ArrayList<ApplicationType> resultList = new ArrayList<ApplicationType>();
for (int applicationWeightX = 0; applicationWeightX < applicationWeights.length; applicationWeightX++) {
float applicationWeight = applicationWeights[applicationWeightX];
if (applicationWeight >= 0.0){
ApplicationType foundApplication = applications[applicationWeightX];
resultList.add(foundApplication);
if (MAX_PROPOSED_APPLICATIONS != 0 && resultList.size() >= MAX_PROPOSED_APPLICATIONS){
break;
}
}