git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1487 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Arjen Poutsma 2009-07-08 10:15:58 +00:00
parent 898f8192c8
commit 4590172b23
2 changed files with 5 additions and 2 deletions

View File

@ -357,6 +357,9 @@ public class AntPathMatcher implements PathMatcher {
* <li><code>/hotels/{hotel}</code></li> <li><code>/hotels/*</code></li> </ol> the returned comparator will sort this
* list so that the order will be as indicated.
*
* <p>The full path given as parameter is used to test for exact matches. So when the given path is {@code /hotels/2},
* the pattern {@code /hotels/2} will be sorted before {@code /hotels/1}.
*
* @param path the full path to use for comparison
* @return a comparator capable of sorting patterns in order of explicitness
*/

View File

@ -104,10 +104,10 @@ public interface PathMatcher {
Map<String, String> extractUriTemplateVariables(String pattern, String path);
/**
* Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of explicitness.
* Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of explicitness for that path.
* <p>The full algorithm used depends on the underlying implementation, but generally, the returned
* <code>Comparator</code> will {@linkplain java.util.Collections#sort(java.util.List, java.util.Comparator) sort} a
* list so that more specific patterns come before generic patterns.
* list so that more specific patterns (for that come before generic patterns.
*
* @param path the full path to use for comparison
* @return a comparator capable of sorting patterns in order of explicitness