Package pp.battleship.model
Klasse IntPoint
java.lang.Object
pp.battleship.model.IntPoint
- Alle implementierten Schnittstellen:
IntPosition
Represents a point in the two-dimensional plane with integer coordinates.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungIntPoint(int x, int y) Constructs a new IntPoint with the specified coordinates. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanIndicates whether some other object is "equal to" this one.intgetX()Gets the x-coordinate of the point.intgetY()Gets the y-coordinate of the point.inthashCode()Returns a hash code value for the IntPoint.toString()Returns a string representation of the IntPoint.
-
Konstruktordetails
-
IntPoint
public IntPoint(int x, int y) Constructs a new IntPoint with the specified coordinates.- Parameter:
x- the x-coordinate of the pointy- the y-coordinate of the point
-
-
Methodendetails
-
getX
public int getX()Gets the x-coordinate of the point.- Angegeben von:
getXin SchnittstelleIntPosition- Gibt zurück:
- the x-coordinate
-
getY
public int getY()Gets the y-coordinate of the point.- Angegeben von:
getYin SchnittstelleIntPosition- Gibt zurück:
- the y-coordinate
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the IntPoint. -
toString
Returns a string representation of the IntPoint.
-