Package forgottentowns.mod.api
Record Class ColonyContext.Status
java.lang.Object
java.lang.Record
forgottentowns.mod.api.ColonyContext.Status
- Record Components:
key- translation key in the owning mod's namespacearguments- immutable formatted arguments, such as a citizen's name or remaining days
- Enclosing interface:
ColonyContext
Localized roster status, such as a relationship or a temporary absence from work.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Status
Copies arguments for a localized citizen status without validating key ownership.- Parameters:
key- translation key, checked when the status is applied through the contextarguments- message arguments- Throws:
NullPointerException- if arguments is null or contains 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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-