spiel
Class Koordinaten
java.lang.Object
spiel.Koordinaten
- All Implemented Interfaces:
- java.io.Serializable
public final class Koordinaten
- extends java.lang.Object
- implements java.io.Serializable
Repräsentation von Koordinaten in dem 2-dimensionalen
Spielbrett. Änderungen zu 1.2:
Klasse, nicht Interface. Nicht mehr parametrisiert.
equals-Methode (nun auch mit Argument vom Typ Object)
Neu in 1.3: hashCode() von Object überschrieben
- Version:
- 1.3
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object o)
|
int |
getX()
|
int |
getY()
|
int |
hashCode()
der Hashcode wird mittels einer "magischen" Zahl ermittelt,
und zwar erste Komponente mal 94687 plus zweite Komponente |
int |
koordinateX()
|
int |
koordinateY()
|
void |
setX(int x)
|
void |
setY(int y)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Koordinaten
public Koordinaten(int x,
int y)
Koordinaten
public Koordinaten()
koordinateX
public int koordinateX()
koordinateY
public int koordinateY()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- der Hashcode wird mittels einer "magischen" Zahl ermittelt,
und zwar erste Komponente mal 94687 plus zweite Komponente
- Overrides:
hashCode
in class java.lang.Object
setX
public void setX(int x)
setY
public void setY(int y)
getX
public int getX()
getY
public int getY()