public RouteMatch < ? > fulfillArgumentRequirements ( RouteMatch < ? > route , HttpRequest < ? > request , boolean satisfyOptionals ) { Collection < Argument > requiredArguments = route . getRequiredArguments ( ) ; Map < String , Object > argumentValues ; if ( requiredArguments . isEmpty ( ) ) { // no required arguments so just execute argumentValues = Collections . emptyMap ( ) ; } else { argumentValues = new LinkedHashMap <> ( ) ; // Begin try fulfilling the argument requirements for ( Argument argument : requiredArguments ) { getValueForArgument ( argument , request , satisfyOptionals ) . ifPresent ( ( value ) - > argumentValues . put ( argument . getName ( ) , value ) ) ; } } route = route . fulfill ( argumentValues ) ; return route ; }
Attempt to satisfy the arguments of the given route with the data from the given request .