Record Class SettlementTrading.World

java.lang.Object
java.lang.Record
forgottentowns.mod.api.SettlementTrading.World
Record Components:
id - persistent town UUID
name - displayed town name
biome - uppercase biome identifier
day - local elapsed day, starting at one
daysPerSeason - native calendar season length
campaignStage - empty for sandbox
campaignProfile - empty outside a named campaign profile
completedStages - stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries
Enclosing interface:
SettlementTrading

public static record SettlementTrading.World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages) extends Record
Immutable settlement context.
  • Constructor Details

    • World

      public World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages)
      Detaches progression values.
      Parameters:
      id - persistent town UUID
      name - displayed town name
      biome - uppercase biome identifier
      day - elapsed local day
      daysPerSeason - season length
      campaignStage - current stage
      campaignProfile - profile identifier
      completedStages - completed stage identifiers
      Throws:
      NullPointerException - if completedStages is null or contains null
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • biome

      public String biome()
      Returns the value of the biome record component.
      Returns:
      the value of the biome record component
    • day

      public int day()
      Returns the value of the day record component.
      Returns:
      the value of the day record component
    • daysPerSeason

      public int daysPerSeason()
      Returns the value of the daysPerSeason record component.
      Returns:
      the value of the daysPerSeason record component
    • campaignStage

      public String campaignStage()
      Returns the value of the campaignStage record component.
      Returns:
      the value of the campaignStage record component
    • campaignProfile

      public String campaignProfile()
      Returns the value of the campaignProfile record component.
      Returns:
      the value of the campaignProfile record component
    • completedStages

      public Set<String> completedStages()
      Returns the value of the completedStages record component.
      Returns:
      the value of the completedStages record component