java.lang.Object
org.klomp.snark.web.Sorters.FAISort
org.klomp.snark.web.Sorters.FAIPriorityComparator
- All Implemented Interfaces:
Serializable, Comparator<Sorters.FileAndIndex>
- Enclosing class:
Sorters
Orders files by download priority.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFixed id, the comparator is never serialized across versions.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintHighest first.Methods inherited from class Sorters.FAISort
compare, compLongModifier and TypeMethodDescriptionintprotected static intcompLong(long l, long r) Compares two longs without overflow.Methods 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
FAIPriorityComparator
public FAIPriorityComparator(boolean rev) Creates the file priority comparator.- Parameters:
rev- true to reverse the order
Method Details
compareIt
Highest first.- Specified by:
compareItin classSorters.FAISort- Parameters:
l- the first entryr- the second entry- Returns:
- the order of the two entries