List<ResourceRequirement> resourceRequirementList = new ArrayList<ResourceRequirement>(
resourceSize);
for (int k = 0; k < resourceSize; k++) {
int requirement = Integer.parseInt(tokens[(first ? 3 : 2) + k]);
if (requirement != 0) {
ResourceRequirement resourceRequirement = new ResourceRequirement();
resourceRequirement.setId(resourceRequirementId);
resourceRequirement.setExecutionMode(executionMode);
Resource resource;
if (k < globalResourceListSize) {
resource = schedule.getResourceList().get(k);
} else {
resource = project.getLocalResourceList().get(k - globalResourceListSize);
}
resourceRequirement.setResource(resource);
resourceRequirement.setRequirement(requirement);
resourceRequirementList.add(resourceRequirement);
resourceRequirementId++;
}
}
executionMode.setResourceRequirementList(resourceRequirementList);