类 AntPathMatcher.AntPatternComparator

  • 所有已实现的接口:
    java.util.Comparator<java.lang.String>
    封闭类:
    AntPathMatcher

    protected static class AntPathMatcher.AntPatternComparator
    extends java.lang.Object
    implements java.util.Comparator<java.lang.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
    • 嵌套类概要

      嵌套类 
      修饰符和类型 说明
      private static class  AntPathMatcher.AntPatternComparator.PatternInfo
      Value class that holds information about the pattern, e.g. number of occurrences of "*", "**", and "{" pattern elements.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private java.lang.String path  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      int compare​(java.lang.String pattern1, java.lang.String pattern2)
      Compare two patterns to determine which should match first, i.e. which is the most specific regarding the current path.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • 字段详细资料

      • path

        private final java.lang.String path
    • 构造器详细资料

      • AntPatternComparator

        public AntPatternComparator​(java.lang.String path)
    • 方法详细资料

      • compare

        public int compare​(java.lang.String pattern1,
                           java.lang.String pattern2)
        Compare two patterns to determine which should match first, i.e. which is the most specific regarding the current path.
        指定者:
        compare 在接口中 java.util.Comparator<java.lang.String>
        返回:
        a negative integer, zero, or a positive integer as pattern1 is more specific, equally specific, or less specific than pattern2.