Class CourseAndPosition

java.lang.Object
  |
  +--CourseAndPosition

public class CourseAndPosition
extends java.lang.Object

Definition of a Ship's position and course.

See Also:
Ship

Constructor Summary
CourseAndPosition(double course, Position position)
          Set the immutable attributes
 
Method Summary
 boolean equals(java.lang.Object o)
          Does this course and position match another?
 double getCourse()
          Return the course.
 Position getPosition()
          Return the position.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseAndPosition

public CourseAndPosition(double course,
                         Position position)
Set the immutable attributes
Method Detail

getPosition

public Position getPosition()
Return the position.

getCourse

public double getCourse()
Return the course.

equals

public boolean equals(java.lang.Object o)
Does this course and position match another?
Returns:
true if o is a CourseAndPosition with matching course and position attributes.
Overrides:
equals in class java.lang.Object