Package megamek.common.jacksonAdapters
Record Class PrincessSettingsBuilder.PriorityTarget
java.lang.Object
java.lang.Record
megamek.common.jacksonAdapters.PrincessSettingsBuilder.PriorityTarget
- Record Components:
unit- the ID of the target unitpriority- the target priority, 1 (shoot first) to 5, ornullfor the default, 3
- Enclosing class:
PrincessSettingsBuilder
public static record PrincessSettingsBuilder.PriorityTarget(int unit, @Nullable Integer priority)
extends Record
One entry of a scenario's
priorityTargets: list: a unit the bot should go for first, and optionally how
keenly. Scenario units can carry a fixed id:, which is what unit refers to.
bot:
priorityTargets:
- unit: 12
priority: 1
- unit: 14
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityTarget(int unit, Integer priority) Creates an instance of aPriorityTargetrecord 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.priority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.intunit()Returns the value of theunitrecord component.
-
Constructor Details
-
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 '=='. -
unit
public int unit()Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-