java.lang.Object
org.klomp.snark.web.Sorters.Sort
org.klomp.snark.web.Sorters.RemainingComparator
All Implemented Interfaces:
Serializable, Comparator<Snark>
Enclosing class:
Sorters

private static class Sorters.RemainingComparatorextends Sorters.Sort
Orders torrents by bytes left to download.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Fixed id, the comparator is never serialized across versions.
      See Also:
  • Constructor Details

    • RemainingComparator

      public RemainingComparator(boolean rev, String lang)
      Creates the remaining-bytes comparator.
      Parameters:
      rev - true to reverse the order
      lang - the language whose collation to use
  • Method Details

    • compareIt

      public int compareIt(Snark l, Snark r)
      Description copied from class: Sorters.Sort
      Compare two torrents on the subclass's column, falling back to name order.
      Specified by:
      compareIt in class Sorters.Sort
      Parameters:
      l - the left-hand torrent to compare
      r - the right-hand torrent to compare
      Returns:
      negative, zero or positive as l sorts before, with or after r