public class SimpleRouteMatcher extends Object implements RouteMatcher
RouteMatcher that delegates to a PathMatcher.
 Note: This implementation is not efficient since
 PathMatcher treats paths and patterns as Strings. For more optimized
 performance use the PathPatternRouteMatcher from spring-web
 which enables use of parsed routes and patterns.
RouteMatcher.Route| Constructor and Description | 
|---|
SimpleRouteMatcher(PathMatcher pathMatcher)
Create a new  
SimpleRouteMatcher for the given
 PathMatcher delegate. | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
combine(String pattern1,
       String pattern2)
Combines two patterns into a single pattern. 
 | 
PathMatcher | 
getPathMatcher()
Return the underlying  
PathMatcher delegate. | 
Comparator<String> | 
getPatternComparator(RouteMatcher.Route route)
Given a route, return a  
Comparator suitable for sorting patterns
 in order of explicitness for that route, so that more specific patterns
 come before more generic ones. | 
boolean | 
isPattern(String route)
Whether the given  
route contains pattern syntax which requires
 the RouteMatcher.match(String, Route) method, or if it is a regular String
 that could be compared directly to others. | 
boolean | 
match(String pattern,
     RouteMatcher.Route route)
Match the given route against the given pattern. 
 | 
Map<String,String> | 
matchAndExtract(String pattern,
               RouteMatcher.Route route)
Match the pattern to the route and extract template variables. 
 | 
RouteMatcher.Route | 
parseRoute(String route)
Return a parsed representation of the given route. 
 | 
public SimpleRouteMatcher(PathMatcher pathMatcher)
SimpleRouteMatcher for the given
 PathMatcher delegate.public PathMatcher getPathMatcher()
PathMatcher delegate.public RouteMatcher.Route parseRoute(String route)
RouteMatcherparseRoute in interface RouteMatcherroute - the route to parsepublic boolean isPattern(String route)
RouteMatcherroute contains pattern syntax which requires
 the RouteMatcher.match(String, Route) method, or if it is a regular String
 that could be compared directly to others.isPattern in interface RouteMatcherroute - the route to checktrue if the given route represents a patternpublic String combine(String pattern1, String pattern2)
RouteMatchercombine in interface RouteMatcherpattern1 - the first patternpattern2 - the second patternpublic boolean match(String pattern, RouteMatcher.Route route)
RouteMatchermatch in interface RouteMatcherpattern - the pattern to try to matchroute - the route to test againsttrue if there is a match, false otherwise@Nullable public Map<String,String> matchAndExtract(String pattern, RouteMatcher.Route route)
RouteMatchermatchAndExtract in interface RouteMatcherpattern - the pattern, possibly containing templates variablesroute - the route to extract template variables frompublic Comparator<String> getPatternComparator(RouteMatcher.Route route)
RouteMatcherComparator suitable for sorting patterns
 in order of explicitness for that route, so that more specific patterns
 come before more generic ones.getPatternComparator in interface RouteMatcherroute - the full path to use for comparison