Package org.springframework.util
Class AntPathMatcher.AntPatternComparator
java.lang.Object
org.springframework.util.AntPathMatcher.AntPatternComparator
- All Implemented Interfaces:
- Comparator<String>
- Enclosing class:
- AntPathMatcher
protected static class AntPathMatcher.AntPatternComparator
extends Object
implements Comparator<String>
The default 
Comparator implementation returned by
 AntPathMatcher.getPatternComparator(String).
 In order, the most "generic" pattern is determined by the following:
- if it's null or a capture all pattern (i.e. it is equal to "/**")
- if the other pattern is an actual match
- if it's a catch-all pattern (i.e. it ends with "**"
- if it's got more "*" than the other pattern
- if it's got more "{foo}" than the other pattern
- if it's shorter than the other pattern
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Constructor Details- 
AntPatternComparator
 
- 
- 
Method Details- 
compareCompare two patterns to determine which should match first, i.e. which is the most specific regarding the current path.- Specified by:
- comparein interface- Comparator<String>
- Returns:
- a negative integer, zero, or a positive integer as pattern1 is more specific, equally specific, or less specific than pattern2.
 
 
-