Package forgottentowns.mod.api
Record Class ColonyEvent.CitizenArrived
java.lang.Object
java.lang.Record
forgottentowns.mod.api.ColonyEvent.CitizenArrived
- Record Components:
citizen- detached arriving actor; does not imply a permanent civilian residentday- monotonic game day
- All Implemented Interfaces:
ColonyEvent
- Enclosing interface:
ColonyEvent
public static record ColonyEvent.CitizenArrived(ColonyEvent.Actor citizen, int day)
extends Record
implements ColonyEvent
A newly created friendly actor, including civilians, recruits, heroes and scripted arrivals.
-
Nested Class Summary
Nested classes/interfaces inherited from interface forgottentowns.mod.api.ColonyEvent
ColonyEvent.Actor, ColonyEvent.CitizenArrived, ColonyEvent.CitizenDied, ColonyEvent.CreatureDied, ColonyEvent.DeathCause, ColonyEvent.HomeChanged, ColonyEvent.PlaceableRemoved -
Constructor Summary
ConstructorsConstructorDescriptionCitizenArrived(ColonyEvent.Actor citizen, int day) Creates an instance of aCitizenArrivedrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncitizen()Returns the value of thecitizenrecord component.intday()Returns the value of thedayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
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 '=='. -
citizen
Returns the value of thecitizenrecord component.- Returns:
- the value of the
citizenrecord component
-
day
public int day()Returns the value of thedayrecord component.- Specified by:
dayin interfaceColonyEvent- Returns:
- the value of the
dayrecord component
-