soccerclient.datamanager
Class Coordinate

java.lang.Object
  |
  +--soccerclient.datamanager.Coordinate
All Implemented Interfaces:
java.io.Serializable

public class Coordinate
extends java.lang.Object
implements java.io.Serializable

Überschrift: Coordinate

Beschreibung: Coordinate is a class for handling coordinates.

Copyright: Copyright (c) 2002

Organisation: pm39

Author:
J.F.G
See Also:
Serialized Form

Constructor Summary
Coordinate()
          Creates a new Coordinate with coordinates (0,0)
Coordinate(double xAchse, double yAchse)
          Creates a new Coordinate
 
Method Summary
 Coordinate addK(Coordinate coor)
          Returns a Coordinate whose value is (this x-coordinate, this y-coordinate) + (x-coordinate of coor, y-coordinate of coor)
 double getX()
          Returns the value of the x-coordinate
 double getY()
          Returns the value of the y-coordinate
 Coordinate scale(double val)
          Returns a Coordinate whose value is (val * (this x-coordinate), val * (this y-coord.))
 void setCoordinate(double xAchse, double yAchse)
          Returns a Coordinate
 void setX(double xAchse)
          Sets the value of the x-coordinate
 void setY(double yAchse)
          Sets the value of the y-coordinate
 Coordinate subK(Coordinate coor)
          Returns a Coordinate whose value is (this x-coordinate , this y-coordinate) - (x-coord. of coordinate, y-coord. of coordinate)
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Coordinate

public Coordinate()
Creates a new Coordinate with coordinates (0,0)

Coordinate

public Coordinate(double xAchse,
                  double yAchse)
Creates a new Coordinate
Parameters:
xAchse - a double value specifying x-coordinate
yAchse - a double value specifying y-coordinate
Method Detail

getX

public double getX()
Returns the value of the x-coordinate
Returns:
a double containing the x-coordinate

getY

public double getY()
Returns the value of the y-coordinate
Returns:
a double containing the y-coordinate

setX

public void setX(double xAchse)
Sets the value of the x-coordinate
Parameters:
xAchse - a double value specifying x-coordinate

setY

public void setY(double yAchse)
Sets the value of the y-coordinate
Parameters:
yAchse - a double value specifying y-coordinate

setCoordinate

public void setCoordinate(double xAchse,
                          double yAchse)
Returns a Coordinate
Parameters:
xAchse - a double value specifying x-coordinate
yAchse - a double value specifying y-coordinate

addK

public Coordinate addK(Coordinate coor)
Returns a Coordinate whose value is

(this x-coordinate, this y-coordinate) + (x-coordinate of coor, y-coordinate of coor)

Parameters:
coor - a Coordinate value to be added to this Coordinate
Returns:
this + coor

subK

public Coordinate subK(Coordinate coor)
Returns a Coordinate whose value is (this x-coordinate , this y-coordinate) - (x-coord. of coordinate, y-coord. of coordinate)
Parameters:
coor - a Coordinate value to be subtracted from this Coordinate
Returns:
this - coor

scale

public Coordinate scale(double val)
Returns a Coordinate whose value is (val * (this x-coordinate), val * (this y-coord.))
Parameters:
val - a double value to be multiplied by this Coordinate
Returns:
val * this