Make Position immutable
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@22 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
1a42f934ac
commit
df2a40b16c
1 changed files with 6 additions and 9 deletions
|
@ -9,20 +9,17 @@ public class Position {
|
|||
private float x;
|
||||
private float y;
|
||||
|
||||
public void setY(float y) {
|
||||
public Position(float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public float getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public float getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setX(float x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public float getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue