Package com.mku.salmon.utils
Class SalmonFileComparators
java.lang.Object
com.mku.salmon.utils.SalmonFileComparators
Useful comparators for SalmonFile.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<SalmonFile>
Get Date Ascending Comparator.static Comparator<SalmonFile>
Get Date Descending Comparator.static Comparator<SalmonFile>
Get default comparator.static Comparator<SalmonFile>
Get Filename Ascending Comparator.static Comparator<SalmonFile>
Get Filename Descending Comparator.static Comparator<SalmonFile>
Get Relevant Comparator.static Comparator<SalmonFile>
Get Size Ascending Comparator.static Comparator<SalmonFile>
Get Size Descending Comparator.static Comparator<SalmonFile>
Get File Type Ascending Comparator.static Comparator<SalmonFile>
Get File Type Descending Comparator.
-
Constructor Details
-
SalmonFileComparators
public SalmonFileComparators()
-
-
Method Details
-
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
Get Filename Ascending Comparator.- Returns:
- The filename scending comparator.
-
getFilenameDescComparator
Get Filename Descending Comparator.- Returns:
- filename descending comparator
-
getSizeAscComparator
Get Size Ascending Comparator.- Returns:
- The size ascending comparator
-
getSizeDescComparator
Get Size Descending Comparator.- Returns:
- The size descending comparator
-
getTypeAscComparator
Get File Type Ascending Comparator.- Returns:
- The file type ascending comparator
-
getTypeDescComparator
Get File Type Descending Comparator.- Returns:
- The file type descending comparator
-
getDateAscComparator
Get Date Ascending Comparator.- Returns:
- The date ascending comparator
-
getDateDescComparator
Get Date Descending Comparator.- Returns:
- The date descending comparator
-
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
-