Package megamek.common.options
Record Class QuirkCatalogEntry
java.lang.Object
java.lang.Record
megamek.common.options.QuirkCatalogEntry
- Record Components:
kind- whether this is a chassis quirk or a weapon quirk. Needed to identify the quirk, becausefast_reloadandmod_weaponseach name both a chassis and a weapon quirk.code- the quirk'sIOptionname (anOptionsConstantsQUIRK_value)status- how completely MegaMek implements the quirkrulesBook- the abbreviated rule book the quirk is printed in (e.g."BMM"), ornullwhen the bundle carries no reference for itrulesPage- the page in that book, as printed, ornullwhen the bundle carries no reference
public record QuirkCatalogEntry(QuirkKind kind, String code, QuirkImplementationStatus status, String rulesBook, String rulesPage)
extends Record
One real quirk option in the
QuirkCatalog: how completely MegaMek implements it and where its rule is
printed.
This record is static reference data assembled from the resource bundle at class load. It is never part of a
serialized object graph (saved games, MUL files), so it deliberately has no SerializationHelper converter -
do not add it to a serialized class without one.
-
Constructor Summary
ConstructorsConstructorDescriptionQuirkCatalogEntry(QuirkKind kind, String code, QuirkImplementationStatus status, String rulesBook, String rulesPage) Creates an instance of aQuirkCatalogEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.Returns the value of therulesBookrecord component.Returns the value of therulesPagerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
getRulesReference
- Returns:
- the localized "Book p.Page" citation for this quirk, or
nullwhen the bundle carries no rules reference for it
-
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). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
rulesBook
Returns the value of therulesBookrecord component.- Returns:
- the value of the
rulesBookrecord component
-
rulesPage
Returns the value of therulesPagerecord component.- Returns:
- the value of the
rulesPagerecord component
-