Package forgottentowns.mod.api
Record Class SettlementTrading.Source
java.lang.Object
java.lang.Record
forgottentowns.mod.api.SettlementTrading.Source
- Record Components:
id- stable route identitykind- packed for completed crate output; older providers may use other source kindscapacityKey- shared production-capacity identitycyclesPerSeason- actual completed crates in the most recent season-length day window, including todayoutputs- crate identity mapped to one unit per completed packing operationinputs- empty for completed output; ingredients have already been consumed
- Enclosing interface:
SettlementTrading
public static record SettlementTrading.Source(String id, String kind, String capacityKey, double cyclesPerSeason, Map<String,Double> outputs, Map<String,Integer> inputs)
extends Record
One completed packing record, retaining the original route shape for mod compatibility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapacityKeyrecord component.doubleReturns the value of thecyclesPerSeasonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.inputs()Returns the value of theinputsrecord component.kind()Returns the value of thekindrecord component.outputs()Returns the value of theoutputsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Source
public Source(String id, String kind, String capacityKey, double cyclesPerSeason, Map<String, Double> outputs, Map<String, Integer> inputs) Copies resource maps.- Parameters:
id- route identitykind- source categorycapacityKey- shared capacity identitycyclesPerSeason- available cyclesoutputs- expected per-cycle outputsinputs- required per-cycle inputs- Throws:
NullPointerException- if either map, a map key, or a 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
capacityKey
Returns the value of thecapacityKeyrecord component.- Returns:
- the value of the
capacityKeyrecord component
-
cyclesPerSeason
public double cyclesPerSeason()Returns the value of thecyclesPerSeasonrecord component.- Returns:
- the value of the
cyclesPerSeasonrecord component
-
outputs
Returns the value of theoutputsrecord component.- Returns:
- the value of the
outputsrecord component
-
inputs
Returns the value of theinputsrecord component.- Returns:
- the value of the
inputsrecord component
-