position.java

来自「struts+spring+hibernate自创框架」· Java 代码 · 共 53 行

JAVA
53
字号
package com.pegasus.framework.util.export.model;

import java.io.Serializable;


public class Position implements Serializable{
    private int x;
    private int y;

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Position)) return false;

        final Position position = (Position) o;

        if (x != position.x) return false;
        if (y != position.y) return false;

        return true;
    }

    public int hashCode() {
        int result;
        result = x;
        result = 29 * result + y;
        return result;
    }

    public String toString() {
        return "Position{" +
                "x=" + x +
                ", y=" + y +
                "}";
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?