if(entities == null || entities.isEmpty())
return null;
// optimize using a map ?
for (Object entity1 : entities) {
ATEFoldingEntity entity = (ATEFoldingEntity) entity1;
if (entity.foldingEntityID().equals(identifier))
return entity;
}
return null;
}