Interface ITransportedUnitsSummary

All Known Implementing Classes:
AbstractTransportedUnitsSummary, ShipTransportedUnitsSummary, TacticalTransportedUnitsSummary, TowTransportedUnitsSummary

public interface ITransportedUnitsSummary
  • Method Details

    • hasTransportedUnits

      boolean hasTransportedUnits()
      Gets a value indicating whether or not this unit is transporting units.
      Returns:
      true if the unit has any transported units
    • getTransportedUnits

      Set<Unit> getTransportedUnits()
      Returns:
      the set of units being transported by this unit.
    • addTransportedUnit

      void addTransportedUnit(Unit unit)
      Adds a unit to our set of transported units.
      Parameters:
      unit - The unit being transported by this instance.
    • removeTransportedUnit

      boolean removeTransportedUnit(Unit unit)
      Removes a unit from our set of transported units.
      Parameters:
      unit - The unit to remove from our set of transported units.
      Returns:
      True if the unit was removed, otherwise false.
    • clearTransportedUnits

      void clearTransportedUnits()
      Clears the set of units being transported by this unit.
    • hasTransportCapacity

      boolean hasTransportCapacity()
      If this unit is capable of transporting another unit, return true
      Returns:
      true if the unit can transport another unit
    • getTransportCapabilities

      Set<TransporterType> getTransportCapabilities()
      Gets the different kinds of transporters the transport has
      Returns:
      Set of Transporter types
    • hasTransportCapacity

      boolean hasTransportCapacity(TransporterType transporterType)
      Returns true if the unit has capacity left for a transporter type
      Parameters:
      transporterType - Does the unit have free capacity in this type?
      Returns:
      True if the unit has capacity, false if not
    • getCurrentTransportCapacity

      double getCurrentTransportCapacity(TransporterType transporterType)
      Returns the current capacity of a transporter type
      Parameters:
      transporterType - What kind of transporter types are we checking?
      Returns:
      The current capacity of the transporter
    • setCurrentTransportCapacity

      void setCurrentTransportCapacity(TransporterType transporterType, double capacity)
      Sets the current transport capacity for the provided transport type
      Parameters:
      transporterType - What kind of transporter are we changing the capacity of?
      capacity - What is the new capacity?
    • recalculateTransportCapacity

      void recalculateTransportCapacity(Vector<megamek.common.Transporter> transporters)
      Recalculates transport capacity
      Parameters:
      transporters - What transporters are we tracking the details of?
    • replaceTransportedUnits

      void replaceTransportedUnits(Set<Unit> newTransportedUnits)
      When fixing references we need to replace the transported units
      Parameters:
      newTransportedUnits - The units that should be transported
    • clearTransportedUnits

      void clearTransportedUnits(Campaign campaign)
      Bay unloading utility used when removing a bay-equipped Transport unit This removes all units assigned to the transport from it
      Parameters:
      campaign - used to remove this unit as a transport from any other units in the campaign
    • unloadTransport

      void unloadTransport(Set<Unit> transportedUnits)
      Main method to be used for unloading units from a transport
      Parameters:
      transportedUnits - Units we wish to unload
    • fixReferences

      void fixReferences(Campaign campaign, Unit unit)
      Fixes references after loading