Package mekhq.campaign.parts
Record Class RefitPartOrders.Shortfall
java.lang.Object
java.lang.Record
mekhq.campaign.parts.RefitPartOrders.Shortfall
- Record Components:
partsOnOrder- parts on the procurement listpartsToOrder- parts still to orderammunition- each ammunition the refit buysarmor- the armor the refit buys, ornullif it buys none
- Enclosing class:
RefitPartOrders
public static record RefitPartOrders.Shortfall(List<Part> partsOnOrder, List<Part> partsToOrder, List<RefitPartOrders.AmountShortfall> ammunition, @Nullable RefitPartOrders.AmountShortfall armor)
extends Record
What a planned refit still has to buy, and how much of that is already on order.
-
Constructor Summary
ConstructorsConstructorDescriptionShortfall(List<Part> partsOnOrder, List<Part> partsToOrder, List<RefitPartOrders.AmountShortfall> ammunition, RefitPartOrders.AmountShortfall armor) Creates an instance of aShortfallrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theammunitionrecord component.armor()Returns the value of thearmorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepartsOnOrderrecord component.Returns the value of thepartsToOrderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Shortfall
public Shortfall(List<Part> partsOnOrder, List<Part> partsToOrder, List<RefitPartOrders.AmountShortfall> ammunition, @Nullable RefitPartOrders.AmountShortfall armor) Creates an instance of aShortfallrecord class.- Parameters:
partsOnOrder- the value for thepartsOnOrderrecord componentpartsToOrder- the value for thepartsToOrderrecord componentammunition- the value for theammunitionrecord componentarmor- the value for thearmorrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
partsOnOrder
Returns the value of thepartsOnOrderrecord component.- Returns:
- the value of the
partsOnOrderrecord component
-
partsToOrder
Returns the value of thepartsToOrderrecord component.- Returns:
- the value of the
partsToOrderrecord component
-
ammunition
Returns the value of theammunitionrecord component.- Returns:
- the value of the
ammunitionrecord component
-
armor
Returns the value of thearmorrecord component.- Returns:
- the value of the
armorrecord component
-