类 LastModifiedResourceComparator

  • 所有已实现的接口:
    java.util.Comparator<org.springframework.core.io.Resource>

    public class LastModifiedResourceComparator
    extends java.lang.Object
    implements java.util.Comparator<org.springframework.core.io.Resource>
    Comparator to sort resources by the file last modified time.
    作者:
    Dave Syer
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      intcompare​(org.springframework.core.io.Resource r1, org.springframework.core.io.Resource r2)
      Compare the two resources by last modified time, so that a sorted list of resources will have oldest first.
      • 从类继承的方法 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
    • 方法详细资料

      • compare

        public int compare​(org.springframework.core.io.Resource r1,
                           org.springframework.core.io.Resource r2)
        Compare the two resources by last modified time, so that a sorted list of resources will have oldest first.
        指定者:
        compare 在接口中 java.util.Comparator<org.springframework.core.io.Resource>
        抛出:
        java.lang.IllegalArgumentException - if one of the resources doesn't exist or its last modified date cannot be determined
        另请参阅:
        Comparator.compare(Object, Object)