Class DisplayResolutionComparator

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.String>

    public class DisplayResolutionComparator
    extends java.lang.Object
    implements java.util.Comparator<java.lang.String>
     Comparator for screen resolutions with format: "height x width"
     Compares ascending by height; if heigths are equal, compares by width.
     e.g
     176 x 540
     240 x 320
     240 x 400
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.String value1, java.lang.String value2)  
      • 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
    • Constructor Detail

      • DisplayResolutionComparator

        public DisplayResolutionComparator()
    • Method Detail

      • compare

        public int compare​(java.lang.String value1,
                           java.lang.String value2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.String>