class GraphToListTranslator {

    public List<SurveyListEntry> toChronoListOfSurveyListEntries(Survey survey) {
        final List<Leg> chronoLegs = survey.getAllLegsInChronoOrder();
        List<SurveyListEntry> entries = toListOfSurveyListEntries(survey);
        Collections.sort(entries, new Comparator<SurveyListEntry>() {
            @Override
            public int compare(SurveyListEntry e0, SurveyListEntry e1) {
                return chronoLegs.indexOf(e0.leg) - chronoLegs.indexOf(e1.leg);
            }
        });
        return entries;
    }

}