Class Grid.RowCellComparator

  • All Implemented Interfaces:
    java.util.Comparator<GridCell>
    Enclosing class:
    Grid

    private static final class Grid.RowCellComparator
    extends java.lang.Object
    implements java.util.Comparator<GridCell>
    This comparator sorts cells so ones with both fixed row and column positions would go first, then cells with fixed row and then all other cells.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RowCellComparator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int calculateModifiers​(GridCell value)  
      int compare​(GridCell lhs, GridCell rhs)  
      • 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

      • RowCellComparator

        private RowCellComparator()
    • Method Detail

      • compare

        public int compare​(GridCell lhs,
                           GridCell rhs)
        Specified by:
        compare in interface java.util.Comparator<GridCell>
      • calculateModifiers

        private int calculateModifiers​(GridCell value)