megamek.common
Class InfantryBay

java.lang.Object
  extended by megamek.common.Bay
      extended by megamek.common.InfantryBay
All Implemented Interfaces:
java.io.Serializable, Transporter

public final class InfantryBay
extends Bay

Represtents a volume of space set aside for carrying ASFs and Small Craft aboard DropShips

See Also:
Serialized Form

Field Summary
 
Fields inherited from class megamek.common.Bay
currentSpace, doors, doorsNext, recoverySlots, totalSpace, troops
 
Constructor Summary
protected InfantryBay()
          The default constructor is only for serialization.
  InfantryBay(int space, int doors)
          Create a space for the given tonnage of troops.
 
Method Summary
 boolean canLoad(Entity unit)
          Determines if this object can accept the given unit.
 java.lang.String getType()
           
 java.lang.String getUnusedString()
          Return a string that identifies the unused capacity of this transporter.
 
Methods inherited from class megamek.common.Bay
destroyDoor, destroyDoorNext, getCargoMpReduction, getDoors, getDoorsNext, getDroppableUnits, getExteriorUnitAt, getExternalUnits, getLaunchableUnits, getLoadedUnits, isWeaponBlockedAt, load, resetDoors, setDoors, setDoorsNext, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfantryBay

protected InfantryBay()
The default constructor is only for serialization.


InfantryBay

public InfantryBay(int space,
                   int doors)
Create a space for the given tonnage of troops. For this class, only the weight of the troops (and their equipment) are considered; if you'd like to think that they are stacked like lumber, be my guest.

Parameters:
space - - The weight of troops (in tons) this space can carry.
Method Detail

canLoad

public boolean canLoad(Entity unit)
Determines if this object can accept the given unit. The unit may not be of the appropriate type or there may be no room for the unit.

Specified by:
canLoad in interface Transporter
Overrides:
canLoad in class Bay
Parameters:
unit - - the Entity to be loaded.
Returns:
true if the unit can be loaded, false otherwise.

getUnusedString

public java.lang.String getUnusedString()
Description copied from class: Bay
Return a string that identifies the unused capacity of this transporter.

Specified by:
getUnusedString in interface Transporter
Overrides:
getUnusedString in class Bay
Returns:
A String meant for a human.

getType

public java.lang.String getType()
Overrides:
getType in class Bay