|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.svg.Waypoint
public class Waypoint
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 |
|---|
protected java.lang.String name
protected Waypoint parent
protected java.util.ArrayList neighbours
protected double x
protected double y
protected boolean visited
| Constructor Detail |
|---|
public Waypoint(java.lang.String name)
name - a String specifying the name of the waypoint.
public Waypoint(java.lang.String name,
double x,
double y)
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 |
|---|
public void setLocation(double x,
double y)
double specifying the x co-ordinate of the waypoint.
y double specifying the y co-ordinate of the waypoint.
public java.lang.String getName()
public double getX()
public double getY()
public void addNeighbour(Waypoint w)
Waypoint object specifying the neighbouring waypoint.
public void setParent(Waypoint w)
Waypoint object specifying the parent waypoint.
public java.util.ArrayList getNeighbours()
public Waypoint getParent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||