Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
C
D
E
G
M
P
R
S
T
C
CourseAndPosition
- class
CourseAndPosition
.
Definition of a Ship's position and course.
CourseAndPosition(double, Position)
- Constructor for class
CourseAndPosition
Set the immutable attributes
D
DEFAULT_COURSE
- Static variable in class
Ship
Default course.
DEFAULT_SPEED
- Static variable in class
Ship
Default speed.
DEFAULT_X
- Static variable in class
Ship
Default X position.
DEFAULT_Y
- Static variable in class
Ship
Default Y position.
E
equals(Object)
- Method in class
Position
Does this position match another?
equals(Object)
- Method in class
CourseAndPosition
Does this course and position match another?
G
getCourse()
- Method in class
Ship
Return the current course.
getCourse()
- Method in class
CourseAndPosition
Return the course.
getCourseAndPosition()
- Method in class
Ship
Return the current course and position.
getName()
- Method in class
Ship
Return the current name.
getPosition()
- Method in class
Ship
Return the current position.
getPosition()
- Method in class
CourseAndPosition
Return the position.
getSpeed()
- Method in class
Ship
Return the current speed.
getWriter()
- Method in class
Ship
Get the writer to be used for reporting.
getX()
- Method in class
Position
Return the X-value of this position.
getY()
- Method in class
Position
Return the Y-value of this position.
M
move()
- Method in class
Ship
Move the ship according to its current speed and position.
P
Position
- class
Position
.
Definition of a Ship's position.
Position(double, double)
- Constructor for class
Position
Create the (immutable) (x,y) pair.
R
report()
- Method in class
Ship
Report the ship's position, course and speed.
run()
- Method in class
Ship
An implementation of the Runnable interface, to enable a Ship to be run in an independent thread, if required.
S
setCourse(double)
- Method in class
Ship
Set the ship's course.
setPosition(double, double)
- Method in class
Ship
Set the ship's position.
setPosition(Position)
- Method in class
Ship
Set the ship's position.
setSpeed(double)
- Method in class
Ship
Set the ship's speed.
setWriter(PrintWriter)
- Method in class
Ship
Set the writer to be used for reporting.
Ship
- class
Ship
.
Definition of a Ship class with position, speed, course and name information.
Ship()
- Constructor for class
Ship
Construct with default position, course and speed.
Ship(double, double)
- Constructor for class
Ship
Construct with explicit position.
Ship(double, double, double)
- Constructor for class
Ship
Construct with explicit position and course.
Ship(double, double, double, double)
- Constructor for class
Ship
Construct with explicit position, course and speed.
Ship(double, double, double, double, String)
- Constructor for class
Ship
Construct with explicit position, course, speed and name.
Ship(String)
- Constructor for class
Ship
Construct with a name.
T
toString()
- Method in class
Position
Return a string representation of this position.
C
D
E
G
M
P
R
S
T
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES