diff --git a/runelite-api/src/main/java/net/runelite/api/Point.java b/runelite-api/src/main/java/net/runelite/api/Point.java index 1c97a43666..f84ad39707 100644 --- a/runelite-api/src/main/java/net/runelite/api/Point.java +++ b/runelite-api/src/main/java/net/runelite/api/Point.java @@ -24,46 +24,17 @@ */ package net.runelite.api; +import lombok.Value; + /** * A two-dimensional coordinate on the canvas. */ +@Value public class Point { private final int x; private final int y; - public Point(int x, int y) - { - this.x = x; - this.y = y; - } - - @Override - public String toString() - { - return "Point{" + "x=" + x + ", y=" + y + '}'; - } - - /** - * Gets the x-axis coordinate of the point. - * - * @return the x-axis coordinate - */ - public int getX() - { - return x; - } - - /** - * Gets the y-axis coordinate of the point. - * - * @return the y-axis coordinate - */ - public int getY() - { - return y; - } - /** * Gets the distance between this point and another. * @@ -74,40 +45,4 @@ public class Point { return (int) Math.hypot(getX() - other.getX(), getY() - other.getY()); } - - @Override - public int hashCode() - { - int hash = 3; - hash = 23 * hash + this.x; - hash = 23 * hash + this.y; - return hash; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - final Point other = (Point) obj; - if (this.x != other.x) - { - return false; - } - if (this.y != other.y) - { - return false; - } - return true; - } }