java.lang.Object
org.klomp.snark.web.Sorters.Sort
org.klomp.snark.web.Sorters.DownRateComparator
- All Implemented Interfaces:
Serializable, Comparator<Snark>
- Enclosing class:
Sorters
Orders torrents by download rate.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFixed id, the comparator is never serialized across versions.Constructor Summary
ConstructorsConstructorDescriptionDownRateComparator(boolean rev, String lang) Creates the download-rate comparator.Method Summary
All MethodsMethods inherited from class Sorters.Sort
compare, compLongMethods 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:
Constructor Details
DownRateComparator
Creates the download-rate comparator.- Parameters:
rev- true to reverse the orderlang- the language whose collation to use
Method Details
compareIt
Description copied from class:Sorters.SortCompare two torrents on the subclass's column, falling back to name order.- Specified by:
compareItin classSorters.Sort- Parameters:
l- the left-hand torrent to comparer- the right-hand torrent to compare- Returns:
- negative, zero or positive as l sorts before, with or after r