Class SBFUnitPlaceHolder

java.lang.Object
megamek.common.strategicBattleSystems.SBFUnitPlaceHolder
All Implemented Interfaces:
Serializable, InGameObject, BTObject
Direct Known Subclasses:
SBFSomethingOutThereUnitPlaceHolder

public class SBFUnitPlaceHolder extends Object implements InGameObject, Serializable
See Also:
  • Constructor Details

    • SBFUnitPlaceHolder

      public SBFUnitPlaceHolder(SBFFormation formation)
  • Method Details

    • getId

      public int getId()
      Description copied from interface: InGameObject
      Returns this InGameObject's id. The id must be unique to this InGameObject within the current game. equals() must return true for two InGameObject objects with the same id.
      Specified by:
      getId in interface InGameObject
      Returns:
      The game-unique id of this InGameObject (Entity, AlphaStrikeElement etc.)
    • setId

      public void setId(int newId)
      Description copied from interface: InGameObject
      Sets this InGameObject's id. The id must be unique to this InGameObject within the current game. equals() must return true for two InGameObject objects with the same id.
      Specified by:
      setId in interface InGameObject
      Parameters:
      newId - The game-unique id of this InGameObject (Entity, AlphaStrikeElement etc.)
    • getOwnerId

      public int getOwnerId()
      Description copied from interface: InGameObject
      Returns the unique id of this InGameObject's owning player. This id may be Player.NONE.
      Specified by:
      getOwnerId in interface InGameObject
      Returns:
      The player id of the owner of this InGameObject.
    • setOwnerId

      public void setOwnerId(int newOwnerId)
      Description copied from interface: InGameObject
      Sets the unique id of this InGameObject's owning player. This id may be Player.NONE.
      Specified by:
      setOwnerId in interface InGameObject
      Parameters:
      newOwnerId - The player id of the owner of this InGameObject.
    • getStrength

      public int getStrength()
      Description copied from interface: InGameObject
      Returns the current (remaining) battle strength of this unit or object. For combat units, this is the battle value (BV) or the point value (PV).
      Specified by:
      getStrength in interface InGameObject
      Returns:
      The current battle strength (BV/PV)
    • generalName

      public String generalName()
      Description copied from interface: BTObject
      Returns the general name or type name of this unit/object. For standard individual units, this is the chassis. For other types of units or objects this can be the full designation or a general part of the designation. Much like the chassis, this can be much more narrow than the general type of unit ("Mek").

      The general name should not be empty and not return null. Return the chassis in Entity and AlphaStrikeElement.

      Specified by:
      generalName in interface BTObject
      Returns:
      The general name / chassis
    • specificName

      public String specificName()
      Description copied from interface: BTObject
      Returns the specific name or type name of this unit/object. For standard individual units, this is the model. For other types of units or objects this can be a part of the designation, or empty.

      The specific name should not return null. Return the model in Entity and AlphaStrikeElement.

      Specified by:
      specificName in interface BTObject
      Returns:
      The specific name / model
    • getPosition

      public BoardLocation getPosition()
    • toString

      public String toString()
      Overrides:
      toString in class Object