org.mars_sim.msp.core.equipment
Class Equipment

java.lang.Object
  extended by org.mars_sim.msp.core.Unit
      extended by org.mars_sim.msp.core.equipment.Equipment
All Implemented Interfaces:
Serializable, Comparable<Unit>, Salvagable
Direct Known Subclasses:
Bag, Barrel, EVASuit, GasCanister, LargeBag, SpecimenContainer

public abstract class Equipment
extends Unit
implements Salvagable

The Equipment class is an abstract class that represents a useful piece of equipment, such as a EVA suite or a medpack.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mars_sim.msp.core.Unit
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT
 
Method Summary
 void destroy()
          Prepare object for garbage collection.
 Collection<Person> getAffectedPeople()
          Gets a collection of people affected by this entity.
 SalvageInfo getSalvageInfo()
          Gets the salvage info.
 boolean isSalvaged()
          Checks if the item is salvaged.
 void startSalvage(SalvageProcessInfo info, Settlement settlement)
          Indicate the start of a salvage process on the item.
 
Methods inherited from class org.mars_sim.msp.core.Unit
addUnitListener, compareTo, fireUnitUpdate, fireUnitUpdate, getBaseMass, getContainerUnit, getCoordinates, getDescription, getInventory, getMass, getName, getTopContainerUnit, getUnitManager, hasUnitListener, removeUnitListener, setBaseMass, setContainerUnit, setCoordinates, setDescription, setName, timePassing, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAffectedPeople

public Collection<Person> getAffectedPeople()
Gets a collection of people affected by this entity.

Returns:
person collection

isSalvaged

public boolean isSalvaged()
Checks if the item is salvaged.

Specified by:
isSalvaged in interface Salvagable
Returns:
true if salvaged.

startSalvage

public void startSalvage(SalvageProcessInfo info,
                         Settlement settlement)
Indicate the start of a salvage process on the item.

Specified by:
startSalvage in interface Salvagable
Parameters:
info - the salvage process info.
settlement - the settlement where the salvage is taking place.

getSalvageInfo

public SalvageInfo getSalvageInfo()
Gets the salvage info.

Specified by:
getSalvageInfo in interface Salvagable
Returns:
salvage info or null if item not salvaged.

destroy

public void destroy()
Description copied from class: Unit
Prepare object for garbage collection.

Overrides:
destroy in class Unit


Copyright © 2009-2013. All Rights Reserved.