Package forgottentowns.mod.api
Record Class SettlementMap.Recruit
java.lang.Object
java.lang.Record
forgottentowns.mod.api.SettlementMap.Recruit
- Record Components:
id- stable offer identity within the locationarchetypeId- native civilian or soldier archetypegold- price per person, within 1..100000perSeason- city-wide supply per season, within 0..1000requiredStage- additional completed-stage requirement, or empty
- Enclosing interface:
SettlementMap
public static record SettlementMap.Recruit(String id, String archetypeId, int gold, int perSeason, String requiredStage)
extends Record
A paid unit arrival offered by a completed city.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thearchetypeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.intgold()Returns the value of thegoldrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theperSeasonrecord component.Returns the value of therequiredStagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Recruit
Creates an instance of aRecruitrecord class.- Parameters:
id- the value for theidrecord componentarchetypeId- the value for thearchetypeIdrecord componentgold- the value for thegoldrecord componentperSeason- the value for theperSeasonrecord componentrequiredStage- the value for therequiredStagerecord component
-
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
archetypeId
Returns the value of thearchetypeIdrecord component.- Returns:
- the value of the
archetypeIdrecord component
-
gold
public int gold()Returns the value of thegoldrecord component.- Returns:
- the value of the
goldrecord component
-
perSeason
public int perSeason()Returns the value of theperSeasonrecord component.- Returns:
- the value of the
perSeasonrecord component
-
requiredStage
Returns the value of therequiredStagerecord component.- Returns:
- the value of the
requiredStagerecord component
-