Package sk.tuke.kpi.gamelib.graphics
Class Point
- java.lang.Object
-
- sk.tuke.kpi.gamelib.graphics.Point
-
public final class Point extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Point(int x, int y)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getX()
int
getY()
int
hashCode()
@NotNull Point
plus(@NotNull Point point)
Returns a new point as a result of summing point coordinates to the current ones.java.lang.String
toString()
@NotNull Point
translate(int x, int y)
Returns a new point translated by x and y.
-
-
-
Method Detail
-
getX
public int getX()
-
getY
public int getY()
-
translate
@NotNull public @NotNull Point translate(int x, int y)
Returns a new point translated by x and y.
-
plus
@NotNull public @NotNull Point plus(@NotNull @NotNull Point point)
Returns a new point as a result of summing point coordinates to the current ones.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-