Record Class ClimbingChoiceDialog.ClimbingOption
java.lang.Object
java.lang.Record
megamek.client.ui.dialogs.phaseDisplay.ClimbingChoiceDialog.ClimbingOption
- Record Components:
levels- the number of levels for this action (0 = cling/drop)mpCost- the MP cost for this actionlabel- the display labeltype- the type of climbing action
- Enclosing class:
ClimbingChoiceDialog
public static record ClimbingChoiceDialog.ClimbingOption(int levels, int mpCost, String label, ClimbingChoiceDialog.ClimbingActionType type)
extends Record
Represents a climbing action choice.
-
Constructor Summary
ConstructorsConstructorDescriptionClimbingOption(int levels, int mpCost, String label, ClimbingChoiceDialog.ClimbingActionType type) Creates an instance of aClimbingOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.intlevels()Returns the value of thelevelsrecord component.intmpCost()Returns the value of thempCostrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ClimbingOption
public ClimbingOption(int levels, int mpCost, String label, ClimbingChoiceDialog.ClimbingActionType type) Creates an instance of aClimbingOptionrecord class.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
levels
public int levels()Returns the value of thelevelsrecord component.- Returns:
- the value of the
levelsrecord component
-
mpCost
public int mpCost()Returns the value of thempCostrecord component.- Returns:
- the value of the
mpCostrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-