- Optional<TicketLink> foundTicketLink = empty();
- for (TicketLink ticketLink : ticketLinks) {
- if (ticketLink.getPresentationTime().equals(presentationTimeAndLink.getFirst()) && ticketLink.getLink().equals(presentationTimeAndLink.getSecond())) {
- foundTicketLink = Optional.of(ticketLink);
+ Optional<Performance> foundLink = empty();
+ for (Performance performance : performances) {
+ if (performance.getTime().equals(presentationTimeAndLink.getFirst()) && performance.getLink().equals(presentationTimeAndLink.getSecond())) {
+ foundLink = Optional.of(performance);