/** * Class for retaining comparator pairs in a clean fashion, since Java lacks * tuples--have to do it the hard way. * @author Ed Ropple */ public class ComparatorPair { int leftComparator; int rightComparator; /** * Constructor. Creates new ComparatorPair * @param leftComp The number of the comparator on the left side of the grid. * @param rightComp The number of the comparator on the right side of the grid. */ public ComparatorPair(int leftComp, int rightComp) { leftComparator = leftComp; rightComparator = rightComp; } /** * @return The number of the comparator on the left side of the grid. */ public Integer left() { return leftComparator; } /** * @return The number of the comparator on the right side of the grid. */ public Integer right() { return rightComparator; } /** * Return a string representation in the form of "x y", where * x == left() and y == right(). * @return The string representation of the ComparatorPair. */ @Override public String toString() { return this.left().toString() + " " + this.right().toString(); } }