public class Pair { private int x; private int y; private boolean z; /** * Pair constructor * * @param x an integer * @param y an integer */ public Pair(int x, int y) { this.x = x; this.y = y; } /** * Pair constructor * * @param x an integer * @param z a boolean */ public Pair(int x, boolean z) { this.x = x; this.z = z; } /** * Returns the value stored in x * * @return the value stored in x */ public int getX() { return this.x; } /** * Returns the value stored in y * * @return the value stored in y */ public int getY() { return this.y; } /** * Returns the boolean stored in z * * @return the boolean stored in z */ public boolean getZ() { return this.z; } /** * Modifies the value stored in x * * @param x the new value to store in x */ public void setX(int x) { this.x = x; } /** * Modifies the value stored in y * * @param y the new value to store in y */ public void setY(int y) { this.y = y; } }