java.lang.Object
org.klomp.snark.web.Sorters.FileNameComparator
- All Implemented Interfaces:
Serializable, Comparator<Sorters.FileAndIndex>
- Enclosing class:
Sorters
private static class Sorters.FileNameComparatorextends Object implements Comparator<Sorters.FileAndIndex>, Serializable
Sort alphabetically in current locale, ignore case, directories first.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final CollatorCached, case-insensitive at secondary strength.private static final longFixed id, the comparator is never serialized across versions.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic intCompares two files of a torrent.intMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Field Details
serialVersionUID
private static final long serialVersionUIDFixed id, the comparator is never serialized across versions.- See Also:
_c
Cached, case-insensitive at secondary strength.
Constructor Details
FileNameComparator
private FileNameComparator()Orders a torrent's files by name.
Method Details
compare
- Specified by:
comparein interfaceComparator<Sorters.FileAndIndex>
comp
Compares two files of a torrent.- Parameters:
l- the first filer- the second file- Returns:
- negative, zero or positive as l sorts before, with or after r