org.dartra.standard
Class StandardLocation

java.lang.Object
  extended byorg.dartra.standard.PersistentObject
      extended byorg.dartra.standard.StandardLocation
All Implemented Interfaces:
Location, Persistent

public class StandardLocation
extends PersistentObject
implements Location

Location on a standard darts board.

Author:
Erwin Vervaet

Constructor Summary
StandardLocation(double x, double y)
           
 
Method Summary
 double distanceTo(Location l)
          Calculate the distance between this location and given location.
 boolean equals(java.lang.Object obj)
           
 double getX()
          Return the x coordinate of this location.
 double getY()
          Return the y coordinate of this location.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class org.dartra.standard.PersistentObject
getId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.dartra.framework.Persistent
getId, setId
 

Constructor Detail

StandardLocation

public StandardLocation(double x,
                        double y)
Method Detail

getX

public double getX()
Description copied from interface: Location

Return the x coordinate of this location.

Specified by:
getX in interface Location

getY

public double getY()
Description copied from interface: Location

Return the y coordinate of this location.

Specified by:
getY in interface Location

distanceTo

public double distanceTo(Location l)
Description copied from interface: Location

Calculate the distance between this location and given location.

Specified by:
distanceTo in interface Location

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()