org.formaria.svg
Class Waypoint

java.lang.Object
  extended by org.formaria.svg.Waypoint

public class Waypoint
extends java.lang.Object

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.2 $


Field Summary
protected  java.lang.String name
           
protected  java.util.ArrayList neighbours
           
protected  Waypoint parent
           
protected  boolean visited
           
protected  double x
           
protected  double y
           
 
Constructor Summary
Waypoint(java.lang.String name)
          Creates a new instance of Waypoint
Waypoint(java.lang.String name, double x, double y)
          Creates a new instance of Waypoint
 
Method Summary
 void addNeighbour(Waypoint w)
          Add a neighbour waypoint to this waypoint.
 java.lang.String getName()
          Return the name assigned to this waypoint.
 java.util.ArrayList getNeighbours()
          Returns an ArrayList of all the neighbouring waypoints of this waypoint.
 Waypoint getParent()
          Returns the parent of this waypoint.
 double getX()
          Return the x co-ordinate of this waypoint.
 double getY()
          Return the y co-ordinate of this waypoint.
 void setLocation(double x, double y)
          Set the location of the waypoint.
 void setParent(Waypoint w)
          Set the parent waypoint of the waypoint i.e a waypoint that hasa link to this waypoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

parent

protected Waypoint parent

neighbours

protected java.util.ArrayList neighbours

x

protected double x

y

protected double y

visited

protected boolean visited
Constructor Detail

Waypoint

public Waypoint(java.lang.String name)
Creates a new instance of Waypoint

Parameters:
name - a String specifying the name of the waypoint.

Waypoint

public Waypoint(java.lang.String name,
                double x,
                double y)
Creates a new instance of Waypoint

Parameters:
name - a String specifying the name of the waypoint.
x - double specifying the x coordinate of the waypoint.
y - double specifying the y coordinate of the waypoint.
Method Detail

setLocation

public void setLocation(double x,
                        double y)
Set the location of the waypoint. x double specifying the x co-ordinate of the waypoint. y double specifying the y co-ordinate of the waypoint.


getName

public java.lang.String getName()
Return the name assigned to this waypoint.


getX

public double getX()
Return the x co-ordinate of this waypoint.


getY

public double getY()
Return the y co-ordinate of this waypoint.


addNeighbour

public void addNeighbour(Waypoint w)
Add a neighbour waypoint to this waypoint. w Waypoint object specifying the neighbouring waypoint.


setParent

public void setParent(Waypoint w)
Set the parent waypoint of the waypoint i.e a waypoint that hasa link to this waypoint. w Waypoint object specifying the parent waypoint.


getNeighbours

public java.util.ArrayList getNeighbours()
Returns an ArrayList of all the neighbouring waypoints of this waypoint.


getParent

public Waypoint getParent()
Returns the parent of this waypoint.