Package forgottentowns.mod.api
Record Class TradeProductionRules.CollectionInput
java.lang.Object
java.lang.Record
forgottentowns.mod.api.TradeProductionRules.CollectionInput
- Record Components:
resource- output resource identitystations- all required placeable definition identitiesanyInput- at least one of these must already be free; empty means no prerequisite
- Enclosing class:
TradeProductionRules
public static record TradeProductionRules.CollectionInput(String resource, Set<String> stations, Set<String> anyInput)
extends Record
Infrastructure that supplies a basic collection input without simulating fuel or containers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanyInput()Returns the value of theanyInputrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.resource()Returns the value of theresourcerecord component.stations()Returns the value of thestationsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollectionInput
Detaches and validates reference syntax.- Parameters:
resource- output resource identitystations- required infrastructureanyInput- alternative already-free input resources- Throws:
IllegalArgumentException- if identifiers are malformed or no station is requiredNullPointerException- if any input 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. All components in this record class are compared withObjects::equals(Object,Object). -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
stations
Returns the value of thestationsrecord component.- Returns:
- the value of the
stationsrecord component
-
anyInput
Returns the value of theanyInputrecord component.- Returns:
- the value of the
anyInputrecord component
-