package wordcloud.collide; /** * Created by kenny on 7/1/14. */ public class Vector2d { private int x; private int y; public Vector2d(int x, int y) { this.x = x; this.y = 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; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Vector2d)) return false; Vector2d vector2d = (Vector2d) o; if (x != vector2d.x) return false; if (y != vector2d.y) return false; return true; } @Override public int hashCode() { int result = x; result = 31 * result + y; return result; } @Override public String toString() { return "Vector2d{" + "x=" + x + ", y=" + y + '}'; } }