org.dartra.framework
Interface Zone

All Superinterfaces:
Persistent
All Known Implementing Classes:
StandardZone

public interface Zone
extends Persistent

A zone of a darts board. Zone objects are created and owned by the board to which they belong.

Zone objects have reference semantics.

Author:
Erwin Vervaet

Method Summary
 double distanceTo(Hit hit)
          Returns the distance between this zone and the hit location of given hit.
 double distanceTo(Location location)
          Returns the distance between this zone and given location.
 double distanceTo(Zone zone)
          Returns the distance between this zone and given zone.
 Board getBoard()
          Return the board that this zone is a part of.
 Location getCenter()
          Get the center location of the zone.
 java.lang.String getCode()
          Return the unique code of the zone.
 int getMultiplier()
          Return the multiplier associated with the zone on the darts board.
 java.lang.String getName()
          Return the name of this zone.
 int getNumber()
          Return the number associated with the zone on the darts board.
 
Methods inherited from interface org.dartra.framework.Persistent
getId, setId
 

Method Detail

getBoard

public Board getBoard()

Return the board that this zone is a part of.


getName

public java.lang.String getName()

Return the name of this zone.


getCode

public java.lang.String getCode()

Return the unique code of the zone.


getNumber

public int getNumber()

Return the number associated with the zone on the darts board.


getMultiplier

public int getMultiplier()

Return the multiplier associated with the zone on the darts board.


getCenter

public Location getCenter()

Get the center location of the zone.


distanceTo

public double distanceTo(Zone zone)

Returns the distance between this zone and given zone.


distanceTo

public double distanceTo(Hit hit)

Returns the distance between this zone and the hit location of given hit.


distanceTo

public double distanceTo(Location location)

Returns the distance between this zone and given location.