Class SalmonFileComparators

java.lang.Object
com.mku.salmon.utils.SalmonFileComparators

public class SalmonFileComparators extends Object
Useful comparators for SalmonFile.
  • Constructor Details

    • SalmonFileComparators

      public SalmonFileComparators()
  • Method Details

    • getDefaultComparator

      public static Comparator<SalmonFile> getDefaultComparator()
      Get default comparator. This is the fastest sorting comparator as it simply lists folders first. The rest of the files will be listed without sorting.
      Returns:
      The default comparator
    • getFilenameAscComparator

      public static Comparator<SalmonFile> getFilenameAscComparator()
      Get Filename Ascending Comparator.
      Returns:
      The filename scending comparator.
    • getFilenameDescComparator

      public static Comparator<SalmonFile> getFilenameDescComparator()
      Get Filename Descending Comparator.
      Returns:
      filename descending comparator
    • getSizeAscComparator

      public static Comparator<SalmonFile> getSizeAscComparator()
      Get Size Ascending Comparator.
      Returns:
      The size ascending comparator
    • getSizeDescComparator

      public static Comparator<SalmonFile> getSizeDescComparator()
      Get Size Descending Comparator.
      Returns:
      The size descending comparator
    • getTypeAscComparator

      public static Comparator<SalmonFile> getTypeAscComparator()
      Get File Type Ascending Comparator.
      Returns:
      The file type ascending comparator
    • getTypeDescComparator

      public static Comparator<SalmonFile> getTypeDescComparator()
      Get File Type Descending Comparator.
      Returns:
      The file type descending comparator
    • getDateAscComparator

      public static Comparator<SalmonFile> getDateAscComparator()
      Get Date Ascending Comparator.
      Returns:
      The date ascending comparator
    • getDateDescComparator

      public static Comparator<SalmonFile> getDateDescComparator()
      Get Date Descending Comparator.
      Returns:
      The date descending comparator
    • getRelevanceComparator

      public static Comparator<SalmonFile> getRelevanceComparator()
      Get Relevant Comparator. This will sort by the search result relevancy in the Tag member. Most relevant results will be listed first.
      Returns:
      The relevancy comparator