org.mars_sim.msp.simulation.person.ai.mission
Class NavPoint

java.lang.Object
  extended by org.mars_sim.msp.simulation.person.ai.mission.NavPoint
All Implemented Interfaces:
java.io.Serializable

public class NavPoint
extends java.lang.Object
implements java.io.Serializable

A navigation point for travel missions.

See Also:
Serialized Form

Constructor Summary
NavPoint(Coordinates location, Settlement settlement, java.lang.String description)
          Constructor with location and settlement.
NavPoint(Coordinates location, java.lang.String description)
          Constructor with location.
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks if this NavPoint is the same as another object.
 java.lang.String getDescription()
          Gets the description of the navpoint.
 Coordinates getLocation()
          Gets the location of this navpoint.
 Settlement getSettlement()
          Gets the settlement at the navpoint.
 int hashCode()
          Gets the hash code for this object.
 boolean isSettlementAtNavpoint()
          Checks if there is a settlement at this navpoint.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavPoint

public NavPoint(Coordinates location,
                java.lang.String description)
Constructor with location.

Parameters:
location - the location of the navpoint.
description - the navpoint description.

NavPoint

public NavPoint(Coordinates location,
                Settlement settlement,
                java.lang.String description)
Constructor with location and settlement.

Parameters:
location - the location of the navpoint.
settlement - the settlement at the navpoint.
description - the navpoint description.
Method Detail

getLocation

public Coordinates getLocation()
Gets the location of this navpoint.

Returns:
the coordinate location.

getDescription

public java.lang.String getDescription()
Gets the description of the navpoint.

Returns:
description

getSettlement

public Settlement getSettlement()
Gets the settlement at the navpoint.

Returns:
the settlement or null if none.

isSettlementAtNavpoint

public boolean isSettlementAtNavpoint()
Checks if there is a settlement at this navpoint.

Returns:
true if settlement.

equals

public boolean equals(java.lang.Object object)
Checks if this NavPoint is the same as another object.

Overrides:
equals in class java.lang.Object
Returns:
true if the same navpoint.

hashCode

public int hashCode()
Gets the hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code.