java.lang.Object
org.klomp.snark.web.Sorters.Sort
org.klomp.snark.web.Sorters.ETAComparator
- All Implemented Interfaces:
Serializable, Comparator<Snark>
- Enclosing class:
Sorters
Orders torrents by estimated finish time.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFixed id, the comparator is never serialized across versions.Constructor Summary
ConstructorsMethod Summary
Methods 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
ETAComparator
Creates the ETA 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
eta
Estimates when a download will finish.- Parameters:
snark- the torrent to estimate- Returns:
- seconds until done, Long.MAX_VALUE if never