protected Set<Event> resolveCandidateAuthenticationEvents(final RequestContext context,
                                                              final Service service,
                                                              final RegisteredService registeredService) {

        val byEventId = Comparator.comparing(Event::getId);
        val supplier = (Supplier<TreeSet<Event>>) () -> new TreeSet<>(byEventId);

        return this.orderedResolvers
            .stream()
            .map(resolver -> {
                LOGGER.debug("Resolving candidate authentication event for service [{}] using [{}]", service, resolver.getName());
                return resolver.resolveSingle(context);
            })
            .filter(Objects::nonNull)
            .collect(Collectors.toCollection(supplier));
    }
protected Set < Event > resolveCandidateAuthenticationEvents ( final RequestContext context , final Service service , final RegisteredService registeredService ) { val byEventId = Comparator . comparing ( Event :: getId ) ; val supplier = ( Supplier < TreeSet < Event > > ) ( ) -> new TreeSet < > ( byEventId ) ; return this . orderedResolvers . stream ( ) . map ( resolver -> { LOGGER . debug ( "Resolving candidate authentication event for service [{}] using [{}]" , service , resolver . getName ( ) ) ; return resolver . resolveSingle ( context ) ; } ) . filter ( Objects :: nonNull ) . collect ( Collectors . toCollection ( supplier ) ) ; }
Resolve candidate authentication events set.

@param context           the context
@param service           the service
@param registeredService the registered service
@return the set