@Override
    public Optional<TicketDefinition> findTicketDefinition(final Class<? extends Ticket> ticketClass) {
        return ticketMetadataMap.values()
            .stream()
            .sorted()
            .filter(t -> ticketClass.equals(t.getApiClass()))
            .findFirst();
    }
This is {@link DefaultTicketCatalog}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/DefaultTicketCatalog.java