public class LastModifiedResourceComparator
extends java.lang.Object
implements java.util.Comparator<org.springframework.core.io.Resource>
Constructor and Description |
---|
LastModifiedResourceComparator() |
Modifier and Type | Method and Description |
---|---|
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.
|
public int compare(org.springframework.core.io.Resource r1, org.springframework.core.io.Resource r2)
compare
in interface 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 determinedComparator.compare(Object, Object)