Package forgottentowns.mod.api
Record Class ColonyPanel.Row
java.lang.Object
java.lang.Record
forgottentowns.mod.api.ColonyPanel.Row
- Record Components:
label- localized descriptionvalue- localized value, including any runtime substitutions
- Enclosing class:
ColonyPanel
public static record ColonyPanel.Row(ColonyPanel.Message label, ColonyPanel.Message value)
extends Record
One native information row, with its label and value in separate columns.
-
Constructor Summary
ConstructorsConstructorDescriptionRow(ColonyPanel.Message label, ColonyPanel.Message value) Requires both localized cells. -
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.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Row
Requires both localized cells.- Parameters:
label- descriptionvalue- current value- Throws:
NullPointerException- if either cell is null
-
-
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). -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-