Class StatsTableComparator

  • All Implemented Interfaces:
    java.util.Comparator<StatsTable>

    public class StatsTableComparator
    extends java.lang.Object
    implements java.util.Comparator<StatsTable>
    Comparator to sort StatsTables by a named statistic.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] supportedSortKeys
      Names of supported sort keys as they should be specified on the command line.
    • Constructor Summary

      Constructors 
      Constructor Description
      StatsTableComparator​(java.lang.String sortKey, boolean humanReadable)  
      StatsTableComparator​(java.lang.String sortKey, boolean humanReadable, boolean ascending)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(StatsTable stx, StatsTable sty)
      Compare StatsTable instances based on this instance's sortKey.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • supportedSortKeys

        public static final java.lang.String[] supportedSortKeys
        Names of supported sort keys as they should be specified on the command line.
    • Constructor Detail

      • StatsTableComparator

        public StatsTableComparator​(java.lang.String sortKey,
                                    boolean humanReadable)
      • StatsTableComparator

        public StatsTableComparator​(java.lang.String sortKey,
                                    boolean humanReadable,
                                    boolean ascending)
    • Method Detail

      • compare

        public int compare​(StatsTable stx,
                           StatsTable sty)
        Compare StatsTable instances based on this instance's sortKey.
        Specified by:
        compare in interface java.util.Comparator<StatsTable>