point.java
来自「一款数独游戏的Java源代码」· Java 代码 · 共 80 行
JAVA
80 行
package entity;/** * @author yangan */public class Point { private int xIndex; private int yIndex; public Point(int index, int index2) { super(); xIndex = index; yIndex = index2; } /** * @return Returns the xIndex. * @uml.property name="xIndex" */ public int getXIndex() { return xIndex; } /** * @param xIndex The xIndex to set. * @uml.property name="xIndex" */ public void setXIndex(int index) { xIndex = index; } /** * @return Returns the yIndex. * @uml.property name="yIndex" */ public int getYIndex() { return yIndex; } /** * @param yIndex The yIndex to set. * @uml.property name="yIndex" */ public void setYIndex(int index) { yIndex = index; } @Override public boolean equals(Object obj) { boolean result = false; Point _point; if (obj == this) { result = true; } else { if (obj instanceof Point) { _point = (Point) obj; if ((_point.getXIndex() == this.getXIndex() && (_point .getYIndex() == this.getYIndex()))) { result = true; } } } return result; } @Override public int hashCode() { int result = 31 * this.getXIndex() + this.getYIndex(); return result; } @Override public String toString() { return "Point(" + this.getXIndex() + "," + this.getYIndex() + ")"; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?