public PathMatch matcher ( String rawPath ) { if ( rawPath . startsWith ( "/" ) ) { rawPath = rawPath . substring ( 1 ) ; } Matcher matcher = pattern . matcher ( rawPath ) ; if ( matcher . matches ( ) ) { HashMap < String , String > params = new HashMap <> ( ) ; for ( String namedGroup : namedGroups ) { params . put ( namedGroup , urlDecode ( matcher . group ( namedGroup ) ) ) ; } return new PathMatch ( true , params , matcher ) ; } else { return new PathMatch ( false , Collections . emptyMap ( ) , matcher ) ; } }
Matches the given raw path against this pattern .