app/controllers/DestinationsController.java
private List<Integer> listOfTravellerTypesToTravellerTypeId(List<String> names) {
        if (names.get(0).equals("")) {
            return Collections.emptyList();
        } else {
            List<Integer> result = new ArrayList<>();
            for (String name : names) {
                travellerTypeRepository.getTravellerTypeId(name).ifPresent(result::add);
            }
            return result;
        }
    }
/**
     * Helper funciton to turn List<String> into List<Int> holding the travellerType id's of the given traveller type name
     *
     * @param names List of traveller type names
     * @return List of traveller type id's corresponding to the given names
     */
Helper funciton to turn List into List holding the travellerType id's of the given traveller type name
@param names List of traveller type names
@return List of traveller type id's corresponding to the given names
Helper funciton to turn List into List holding the travellerType id ' s of the given traveller type name @param names List of traveller type names @return List of traveller type id ' s corresponding to the given names
private List<Integer> listOfTravellerTypesToTravellerTypeId(List<String> names) {
        if (names.get(0).equals("")) {
            return Collections.emptyList();
        } else {
            List<Integer> result = new ArrayList<>();
            for (String name : names) {
                travellerTypeRepository.getTravellerTypeId(name).ifPresent(result::add);
            }
            return result;
        }
    }
private List < Integer > listOfTravellerTypesToTravellerTypeId ( List < String > names ) { if ( names . get ( 0 ) . equals ( "" ) ) { return Collections . emptyList ( ) ; } else { List < Integer > result = new ArrayList < > ( ) ; for ( String name : names ) { travellerTypeRepository . getTravellerTypeId ( name ) . ifPresent ( result :: add ) ; } return result ; } }
Helper funciton to turn List<String> into List<Int> holding the travellerType id's of the given traveller type name
 @param names List of traveller type names
 @return List of traveller type id's corresponding to the given names
Helper funciton to turn List<String > into List<Int > holding the travellerType id ' s of the given traveller type name @param names List of traveller type names @return List of traveller type id ' s corresponding to the given names