org.mars_sim.msp.simulation.vehicle
Class LightUtilityVehicle

java.lang.Object
  extended by org.mars_sim.msp.simulation.Unit
      extended by org.mars_sim.msp.simulation.vehicle.Vehicle
          extended by org.mars_sim.msp.simulation.vehicle.GroundVehicle
              extended by org.mars_sim.msp.simulation.vehicle.LightUtilityVehicle
All Implemented Interfaces:
java.io.Serializable, Malfunctionable, Crewable

public class LightUtilityVehicle
extends GroundVehicle
implements Crewable

A light utility vehicle that can be used for construction, loading and mining.

See Also:
Serialized Form

Field Summary
static java.lang.String NAME
           
 
Fields inherited from class org.mars_sim.msp.simulation.vehicle.GroundVehicle
STUCK
 
Fields inherited from class org.mars_sim.msp.simulation.vehicle.Vehicle
EMERGENCY_BEACON_EVENT, MAINTENANCE, MALFUNCTION, malfunctionManager, MOVING, OPERATOR_EVENT, PARKED, RANGE_ERROR_MARGIN, RESERVED_EVENT, SPEED_EVENT, STATUS_EVENT, TOWED
 
Fields inherited from class org.mars_sim.msp.simulation.Unit
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT
 
Fields inherited from interface org.mars_sim.msp.simulation.vehicle.Crewable
CREW_CAPACITY_EVENT
 
Constructor Summary
LightUtilityVehicle(java.lang.String name, java.lang.String description, Settlement settlement)
           
 
Method Summary
 int getAtachmentSlotNumber()
          Gets the number of part slots in the vehicle.
 java.util.Collection<Person> getCrew()
          Gets a collection of the crewmembers.
 int getCrewCapacity()
          Gets the number of crewmembers the vehicle can carry.
 int getCrewNum()
          Gets the current number of crewmembers.
 AmountResource getFuelType()
          Gets the resource type that this vehicle uses for fuel.
 java.util.Collection<Part> getPossibleAttachmentParts()
          Gets a collection of parts that can be attached to this vehicle.
 boolean isAppropriateOperator(VehicleOperator operator)
          Checks if a particular operator is appropriate for a vehicle.
 boolean isCrewmember(Person person)
          Checks if person is a crewmember.
 void timePassing(double time)
          Time passing for vehicle.
 
Methods inherited from class org.mars_sim.msp.simulation.vehicle.GroundVehicle
getDriver, getElevation, getStatus, getTerrainGrade, getTerrainHandlingCapability, isStuck, setDriver, setElevation, setStuck, setTerrainHandlingCapability
 
Methods inherited from class org.mars_sim.msp.simulation.vehicle.Vehicle
addDistanceLastMaintenance, addTotalDistanceTraveled, addToTrail, clearDistanceLastMaintenance, getAffectedPeople, getBaseSpeed, getDirection, getDistanceLastMaintenance, getEstimatedTravelDistancePerSol, getFuelEfficiency, getMalfunctionManager, getOperator, getRange, getSettlement, getSpeed, getTotalDistanceTraveled, getTowingVehicle, getTrail, isEmergencyBeacon, isReserved, isReservedForMaintenance, isReservedForMission, setBaseSpeed, setDirection, setEmergencyBeacon, setOperator, setReservedForMaintenance, setReservedForMission, setSpeed, setTowingVehicle
 
Methods inherited from class org.mars_sim.msp.simulation.Unit
addUnitListener, fireUnitUpdate, fireUnitUpdate, getBaseMass, getContainerUnit, getCoordinates, getDescription, getInventory, getMass, getName, getTopContainerUnit, getUnitManager, removeUnitListener, setBaseMass, setContainerUnit, setCoordinates, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mars_sim.msp.simulation.malfunction.Malfunctionable
getInventory, getName
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

LightUtilityVehicle

public LightUtilityVehicle(java.lang.String name,
                           java.lang.String description,
                           Settlement settlement)
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getFuelType

public AmountResource getFuelType()
Description copied from class: Vehicle
Gets the resource type that this vehicle uses for fuel.

Specified by:
getFuelType in class Vehicle
Returns:
resource type

isAppropriateOperator

public boolean isAppropriateOperator(VehicleOperator operator)
Description copied from class: Vehicle
Checks if a particular operator is appropriate for a vehicle.

Specified by:
isAppropriateOperator in class Vehicle
Parameters:
operator - the operator to check
Returns:
true if appropriate operator for this vehicle.

getCrew

public java.util.Collection<Person> getCrew()
Gets a collection of the crewmembers.

Specified by:
getCrew in interface Crewable
Returns:
crewmembers as Collection

getCrewCapacity

public int getCrewCapacity()
Gets the number of crewmembers the vehicle can carry.

Specified by:
getCrewCapacity in interface Crewable
Returns:
capacity

getCrewNum

public int getCrewNum()
Gets the current number of crewmembers.

Specified by:
getCrewNum in interface Crewable
Returns:
number of crewmembers

isCrewmember

public boolean isCrewmember(Person person)
Checks if person is a crewmember.

Specified by:
isCrewmember in interface Crewable
Parameters:
person - the person to check
Returns:
true if person is a crewmember

getPossibleAttachmentParts

public java.util.Collection<Part> getPossibleAttachmentParts()
Gets a collection of parts that can be attached to this vehicle.

Returns:
collection of parts.

getAtachmentSlotNumber

public int getAtachmentSlotNumber()
Gets the number of part slots in the vehicle.

Returns:
number of part slots.

timePassing

public void timePassing(double time)
                 throws java.lang.Exception
Description copied from class: Vehicle
Time passing for vehicle.

Overrides:
timePassing in class Vehicle
Parameters:
time - the amount of time passing (millisols)
Throws:
java.lang.Exception - if error during time.