public class WayPoint
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_SPEED
Currently positive infinity.
|
private java.awt.geom.Point2D |
point
The 2-dimensional location of the WayPoint.
|
private double |
speed
The speed at which to transit to the WayPoint.
|
| Constructor and Description |
|---|
WayPoint(java.awt.geom.Point2D point)
Constructs a new WayPoint with the given location and infinite speed.
|
WayPoint(java.awt.geom.Point2D point,
double speed)
Constructs a new WayPoint with the given location and speed.
|
WayPoint(WayPoint wayPoint)
Copy Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
java.awt.geom.Point2D |
getPoint() |
double |
getSpeed() |
java.awt.geom.Point2D |
getWayPoint() |
void |
setSpeed(double speed) |
java.lang.String |
toString() |
public static final double DEFAULT_SPEED
private java.awt.geom.Point2D point
private double speed
public WayPoint(java.awt.geom.Point2D point,
double speed)
point - given locationspeed - given speedjava.lang.IllegalArgumentException - If the speed is negative.public WayPoint(java.awt.geom.Point2D point)
point - given locationpublic WayPoint(WayPoint wayPoint)
wayPoint - The WayPoint instance to copypublic java.awt.geom.Point2D getPoint()
public java.awt.geom.Point2D getWayPoint()
public void setSpeed(double speed)
speed - the speed at which to transit to the WayPoint.java.lang.IllegalArgumentException - If the speed is negative.public double getSpeed()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if clone not supported