Package forgottentowns.mod.api
Record Class SettlementTrading.Production
java.lang.Object
java.lang.Record
forgottentowns.mod.api.SettlementTrading.Production
- Record Components:
sources- completed crate production during the most recent season-length day window, including todaystock- total stored tradable resource quantities across stockpiles; reservations are not subtractedselectedExports- resources explicitly selected for recurring exportminimumStocks- legacy field, empty for recorded productionfreeInputs- legacy field, empty for recorded productionworkers- legacy field, zero for recorded productiondaysPerSeason- native season length
- Enclosing interface:
SettlementTrading
public static record SettlementTrading.Production(List<SettlementTrading.Source> sources, Map<String,Integer> stock, Set<String> selectedExports, Map<String,Integer> minimumStocks, Set<String> freeInputs, int workers, int daysPerSeason)
extends Record
Detached completed-production query used by trade policies and colony extensions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedaysPerSeasonrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefreeInputsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theminimumStocksrecord component.Returns the value of theselectedExportsrecord component.sources()Returns the value of thesourcesrecord component.stock()Returns the value of thestockrecord component.final StringtoString()Returns a string representation of this record class.intworkers()Returns the value of theworkersrecord component.
-
Constructor Details
-
Production
public Production(List<SettlementTrading.Source> sources, Map<String, Integer> stock, Set<String> selectedExports, Map<String, Integer> minimumStocks, Set<String> freeInputs, int workers, int daysPerSeason) Detaches all collection values.- Parameters:
sources- production routesstock- stored tradable inventory totals, without reservation subtractionselectedExports- chosen resource identifiersminimumStocks- configured minimum-stock output targetsfreeInputs- naturally available basic inputsworkers- eligible workforcedaysPerSeason- season length- Throws:
NullPointerException- if a collection, collection entry, map key, or map value 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sources
Returns the value of thesourcesrecord component.- Returns:
- the value of the
sourcesrecord component
-
stock
Returns the value of thestockrecord component.- Returns:
- the value of the
stockrecord component
-
selectedExports
Returns the value of theselectedExportsrecord component.- Returns:
- the value of the
selectedExportsrecord component
-
minimumStocks
Returns the value of theminimumStocksrecord component.- Returns:
- the value of the
minimumStocksrecord component
-
freeInputs
Returns the value of thefreeInputsrecord component.- Returns:
- the value of the
freeInputsrecord component
-
workers
public int workers()Returns the value of theworkersrecord component.- Returns:
- the value of the
workersrecord component
-
daysPerSeason
public int daysPerSeason()Returns the value of thedaysPerSeasonrecord component.- Returns:
- the value of the
daysPerSeasonrecord component
-