Class DefaultResourceComparator

  • All Implemented Interfaces:
    java.util.Comparator<org.springframework.core.io.Resource>

    public class DefaultResourceComparator
    extends java.lang.Object
    implements java.util.Comparator<org.springframework.core.io.Resource>
    The default Comparator for Resource comparing Resource.getFilename()
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    ResourcePropertySource.resourceComparator()
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(org.springframework.core.io.Resource r1, org.springframework.core.io.Resource r2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • DefaultResourceComparator

        public DefaultResourceComparator()
    • Method Detail

      • compare

        public int compare​(org.springframework.core.io.Resource r1,
                           org.springframework.core.io.Resource r2)
        Specified by:
        compare in interface java.util.Comparator<org.springframework.core.io.Resource>